2

I have a Pages Library which has a Managed Metadata Column called Category. I am using REST API to query this list.

I need to get the top 13 items and implement "Next" paging.

When I am accessing the API using GET I get the __next metadata in the result set.

_api/web/lists/getByTitle('Pages')/items?$top=13&orderby=Id%20asc

The issue here is that I need the label of the managed metadata and have no choice but to use getItems()

_api/web/lists/getByTitle('Pages')/getItems?$top=13&orderby=Id%20asc

With caml query = ViewXml = "<View><Query></Query></View>" just to returns all items.

On both queries, the $top works however in the getItems() I do not have __next. I am accessing SharePoint Online and making the call using spHttpClient from SharePoint Framework to retrieve the RequestDigest.

Any help would be appreciated.

  • If thelibrary doesn't have an insane amount. It might be easier and even faster to get All Items with minimum (nometadata) metadata upfront, filter them and built a paged UX, and then fill in the missing metadata with more async calls. When a page loads a user doesn't interact with it in the first milsecs, users are slow..it might take 2 seconds for them to take in the page and interact with it. So things like onclick handlers and DIV data-attributes for filters are not required on first render. Same goes for images, everyone is used to images being loaded async. It is the essence of React – Danny '365CSI' Engelman Jan 19 '17 at 9:28
  • Seems like a bug to me. Even <View><RowLimit>6</RowLimit><Query></Query></View> does not provide any information on paging in the response. – Fergal May 11 '17 at 9:08

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.