Michael
Michael

Reputation: 8729

ODATA Restful indexof filter case insenstive

I am using SharePoint Rest ODATA API for an jquery autocomplete field

Relevant code is:

/_vti_bin/listdata.svc/PropertyInformation$filter=indexof(Title,'Carrin') gt -1

This is a simple IndexOf filter. The problem is it is case sensitive.

I am just trying to do a "Contains" filter but I don't believe ODATA has a "Contains" method so I am using the indexOf.

How can I do a tolower() call on indexof? (is it even possible?)

Upvotes: 0

Views: 1854

Answers (1)

Michael
Michael

Reputation: 8729

Found the solution (Quiet simple)

/_vti_bin/listdata.svc/PropertyInformation?$filter=indexof(tolower(Title),'" + request.term.toLowerCase() + "') gt -1

Upvotes: 1

Related Questions