0

What is the REST URI that does the same as the CAML Query shown here

This CAML Query (works great):

CamlBuilder().View().RowLimit(5000).Query().Where().TextField('ItemDescription').Contains('laptop').And().TextField('ItemRef').NotEqualTo('0000000000')

This is what I have tried, to no avail:

.../Items?$filter=(substringof('laptop',ItemDescription)) AND (ItemRef ne '0000000000')

The error I get from SharePoint is:

The expression "(substringof('laptop',ItemDescription)) AND (ItemRef ne '0000000000')" is not valid."

Thank you very much!

2
  • What is the data type of "ItemDescription" and "ItemRef" columns? Jun 17 at 12:17
  • Both are type text fields. It seems the problem was the capital AND... So silly :) its often times the simple things that get us!
    – snugam
    Jun 20 at 3:44

1 Answer 1

0

Try changing and in the filter to lower case.

.../Items?$filter=(substringof('laptop',ItemDescription)) and (ItemRef ne '0000000000')

1
  • As simple as that -- I must have been tired. Fixed! Thank you very much!
    – snugam
    Jun 20 at 3:43

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.