3

Using this: http://www.wonderlaura.com/Lists/Posts/Post.aspx?ID=224

I was able to make a workflow that loops through lists.

Now I understand adding ?$top=5000 at the end of my URL I can pull more than 100 results. however I need to pull about 41000 results. I know it caps at 100. Can someone post how I would do this. I see references to __next and $skiptoken but I dont understand where/how to put this in my workflow.

I would like to be able to build the list dictionary 100 results at a time. If I could figure this out it would be easy but I dont understand how to get it working. I have tried a lot, nothing has worked. Please.

0

$top returns __next with the response. So you have to make another GET request to get more items.

First call end-point looks like

/_api/Web/Lists/getbytitle('list')/Items?$top=1

In the response, you will find

{
    "d": {
        "results": [],
        "__next": "https://xxx.sharepoint.com/Intranet/fm/_api/Web/Lists/getbytitle('Workorders')/Items?%24skiptoken=Paged%3dTRUE%26p_ID%3d1&%24top=1"
    }
}

That means, you have to make another GET request to response.d.__next. You have to make this request until it returns no __next inside your workflow.

3
  • 1
    I am using this interface and have no clue how to do what you are saying. imgur.com/OzhowZH When I do a get of d/__next nothing happens.
    – RageCube
    Oct 29 '15 at 15:59
  • 1
    Wouldnt this still limit me to 5000 items. How do I start my next Call at a higher value so I can pull past the first 5000.
    – RageCube
    Oct 29 '15 at 16:23
  • d/__next is not the valid syntax I guess. Response is a dictionary. so you have to access it through a Key Oct 30 '15 at 5:16
0

I know this is old, but I've found some useful information. First, for SharePoint 2013 you'll need to add $skiptoken=Paged=TRUE&$top=20 to your REST URL and not just ?$top=20 Next, to retrieve the next URL from the response, you'll need to add the following action to your workflow:

Get d/__next from Variable: JSONResults (Output to Variable: nextlink)

Oh, and the link to the how-to has been updated above - https://wonderlaura.com/2014/8/1/workflow-loop-through-multiple-sharepoint-items/

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.