Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple page list on SharePoint

I have a list on SharePoint with several hundred items in it.

I also have some code which will return items from that list,
this will work perfectly fine when it is returning values that are on the first page (items 1-100) but if the item i need to get is on another page in the list then it will return nothing.

My question is how do I addess the list as a whole rather than each page?

EDIT:
I have a web service for

http://[SharePoint site]/_vti_bin/Lists.asmx?op=GetListItems  

then

    ListsWS.Lists lists = new ListWS.Lists();    
    XmlNode items = lists.GetListItems(listName, string.Empty, listQuery, listViewFields, string.Empty, listQueryOptions, null)
    return items;
like image 503
harryovers Avatar asked Sep 24 '26 02:09

harryovers


2 Answers

The view that your webservice call uses might limit how many results are returned. If you don't specify a view in your call then it will use the view flagged as default on the list. The other thing to do is to set or increase the row limit parameter to your call as this will also effect how many results get returned.

like image 163
Daniel Revell Avatar answered Sep 27 '26 16:09

Daniel Revell


Take a look here: GetListItems Method; Important part:

viewName: A string that contains the GUID ... For example, if the view specified by the viewFields parameter has a row limit of 100 rows but the rowLimit parameter contains 1000, then 1,000 rows are returned in the response.

So, your listQueryOptions parameter must include a <RowLimit /> element or your list default limit will be used.

like image 32
Rubens Farias Avatar answered Sep 27 '26 16:09

Rubens Farias