I have a list of 2500 items which I need to filter and then iterate through. Since the payload of returning (potentially) 2500 items is too big I need to break it down into small pieces.

For this purpose I have created a field, which the workflow updates on the item it is done with. But I fear this is not the most efficient way to do it.

I have this query going fetching 100 items:

_api/web/lists(guid'D38E6516-FB4F-4FCF-9E29-4FEC9CE06D2B')/GetItems(query=@v1)?@v1={"ViewXml":"<View><Query><Where><And><And><And><Eq><FieldRef Name='Validated_x0020_by_x0020_manager'/><Value Type='Integer'>0</Value></Eq><IsNotNull><FieldRef Name='Title' /></IsNotNull></And><IsNotNull><FieldRef Name='Manager_Mail' /></IsNotNull></And><Eq><FieldRef Name='Updated_by_workflow'/><Value Type='Integer'>0</Value></Eq></And></Where></Query><RowLimit>100</RowLimit><ViewFields><FieldRef Name='Id' /></ViewFields></View>"}

Once the workflow is done with the first 100 items it loop and fetches another 100 items untill all items have been updated.

Would it be possible to alter the above query to page the result (And not return all the pages of cause) instead and then simply tell the workflow to fetch page 2, then page 3 and so forth? And if so how do I get there?

The above query is executed from a designer workflow and I'm limited to this approach.

  • you need in js ? – Gaurravs May 18 '16 at 6:21
  • Oh sorry forgot to mention, I need this in a designer workflow. – Morten K May 18 '16 at 6:24

Your Answer

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

Browse other questions tagged or ask your own question.