1

In SP2013 on-prem, how does one use REST to get names of specific lists when you don't know their names but you do know part of their name.

For example, if I have a list named MRe-PRv2Forms, how can I run a REST query to retrieve this list with the following form: /_api/web/lists/?$filter=substringof(Title, 'PRv2')?

In this example, I'm referencing the following: <d:Title>MRePRv2Forms</d:Title>

I have many sites that have lists with titles containing the 'PRv2' string and would like to modify my Javascripts to be more general by querying the site they're running on in order to build ajax queries without hard coding list names.

Cheers!

2

You have the order backwards.

Try:

/_api/web/lists/?$filter=substringof('PRv2',Title)

Note that the text of both the string and the property are case sensitive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.