hrossi hrossi - 1 year ago 156
jQuery Question

SharePoint ListData.svc "contains" string filter operator

I'm using getJSON to retrieve list items from SharePoint like this:

[site url]/_vti_bin/listdata.svc/Keywords?filter=startswith(Title,'r')

I want to change it to retrieve this:

[site url]/_vti_bin/listdata.svc/Keywords?filter=contains(Title,'r')

which fails. Is there a "contains" operator for ListData.svc?

Answer Source

the good syntax is:

 [site url]/_vti_bin/listdata.svc/Keywords?$filter=substringof('r',Title) 

All operators are listed here :

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download