0

I had used the below caml query in my JSOM code and I was getting 2000 items .When I tried using REST I get 99 total items.

camlQuery.set_viewXml("<View><Query> <Where> <And> <Eq> <FieldRef Name='TestType' /> <Value Type='Choice'>Samples</Value> </Eq> <And> <IsNull> <FieldRef Name='TestResult' /> </IsNull> <Or> <Eq> <FieldRef Name='Tier' /> <Value Type='Text'>10</Value> </Eq> <Or> <Eq> <FieldRef Name='Tier' /> <Value Type='Text'>1</Value> </Eq> <Or> <Eq> <FieldRef Name='Tier' /><Value Type='Text'>1d</Value> </Eq> <Or> <Eq><FieldRef Name='Tier' /><Value Type='Text'>2</Value></Eq><Eq><FieldRef Name='Tier' /> <Value Type='Text'>5</Value> </Eq> </Or> </Or> </Or> </Or> </And> </And> </Where><OrderBy> <FieldRef Name=' Plan' Ascending='True' />  <FieldRef Name='Title' Ascending='True' /> </OrderBy> </Query>  </View>");

Can any one please help me in knowing what's wrong in my below rest .

_api/web/lists/GetByTitle('OrdersDetails')/items?$Select=Title&$filter=TestType eq Samples & TestResult eq null & Tier eq 0 or Tier eq 1 or Tier eq 1d or Tier eq 2 or Tier eq 5  & $orderby= Plan,Title asc

2 Answers 2

1

use this $top=4990 or $top=4999 "Any number less than 5000" filter in your REST call

_api/web/lists/GetByTitle('OrdersDetails')/items?$top=4990&$Select=Title&$filter=T...
1

Try This please, think the issue in the filter query

_api/web/lists/GetByTitle('OrdersDetails')/items?$Select=Title&$filter=((TestType eq 'Samples') and (TestResult eq null) and (Tier eq 0 or Tier eq 1 or Tier eq 1d or Tier eq 2 or Tier eq 5))&$orderby= Plan,Title asc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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