Sharepoint GetListItems using rowLimit parameter is not limiting the results returned

Posted by Linda on Stack Overflow See other posts from Stack Overflow or by Linda
Published on 2010-04-20T11:55:52Z Indexed on 2010/04/21 8:13 UTC
Read the original article Hit count: 721

In SharePoint I am using the default view of a list. When I use GetListItems method I can pass into it the following:

public XmlNode GetListItems (
    string listName,
    string viewName,
    XmlNode query,
    XmlNode viewFields,
    string rowLimit,
    XmlNode queryOptions,
    string webID
)

I am passing in "" for the viewName and am passing a rowLimit of 1000. By Default view only returns 100 items. 100 Items are still being returned not 1000.

Can you use the rowLimit when not specifying a view? Is it possible to bring back 1000 items using the query instead? I do not really want to use a GUID for the viewName as I would have to look it up for each list and perform a big refactor.

Update

I am now using the guid of the view and my list still returns the incorrect number of items. I know the guid is being used as I sued an incorrect one and it errord out.

Any ideas what could be wrong?

The code that is being sent to the service is as follows:

<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>
    <listName>Media Outlet</listName>
    <viewName>{2822F0D9-A905-44B5-8913-34E6497F1AAF}</viewName>                         
    <query><Query><Where><Eq><FieldRef Name='Outlet_x0020_Type' /><Value Type='Lookup'></Value></Eq></Where><OrderBy><FieldRef Name='Title' /></OrderBy></Query></query>
    <ViewFields></ViewFields>
    <RowLimit>10000</RowLimit>
    <QueryOptions></QueryOptions> 
    <webID></webID>
</GetListItems>              

© Stack Overflow or respective owner

Related posts about sharepoint

Related posts about moss