0

Simple query, I want to get the items ordered by id between 11-20 so I need to skip forst 10 items and than get 10 items.

I try retrieve them with the query below.

this.props.httpClient.get(`${this.siteUrl}/_api/web/lists/getbytitle('${this.props.listName}')/items?$select=Title,Id&$d.__next&$top=10`, 
    SPHttpClient.configurations.v1)
      .then(...)

but it always return first 10 items. There is no next object contains next 10 items as community claimed somehow I couldnt get it.

How can I fix it?

2 Answers 2

2

The $skip parameter does not work in SharePoint 2013 for list items. It only works for collection of data (like list collections, etc).

You can use SharePoint 2010 REST API for achieve your result.

siteUrl + "_vti_bin/ListData.svc/Example?$skip=10&$top=10"

2
  • actually I achieved with using $filter :) Commented Jan 25, 2017 at 10:52
  • okie :) In future if you have requirement then please refer above answer. Commented Jan 25, 2017 at 10:54
0

Maybe you can use the $skip token, as described

https://msdn.microsoft.com/en-us/library/dd541611.aspx

A data service URI with a $skip system query option identifies a subset of the entities in the collection of entities identified by the resource path section of the URI. That subset is defined by seeking N entities into the collection and selecting only the remaining entities (starting with entity N+1).

1
  • Thanks for answer but I already changed it to this.. they said skip is deprecated and used no more also your post about wcf service target which is out of my question(if it is not please let me know), my source is sharepoint list Commented Jan 25, 2017 at 10:21

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.