views:

41

answers:

2

hi,
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;
+1  A: 

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.

Rubens Farias
+2  A: 

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.

Dan Revell