Sharepoint Web Service GetListItems Does Not Return All Rows

I use the GetListItems web service and it only returns about 50% of the results. Is there a limit on the amount of data? Anyway around this?

+5
source share
7 answers

The method receives only the number of lines in the default view of the list. To solve this problem, you can simply increase the number of lines in the default view or, even better, use CAML queries. Here is an article on how to use CAML with web services: http://dotnet.org.za/zlatan/archive/2007/08/01/collaborative-application-markup-language-caml-and-webservices-in-sharepoint -2007.aspx

+5
source

: 1. , getlistitems, , 2. , getlistitems. , , "0", , :   XmlNode doc = doclist.GetListItems( " ", " ", , viewFields, "0", queryOptions, null);

SharePoint, , , / Totals. Totals (, ID), COUNT, . , , , . , .:)

+4

this , .

+2

GetListItems() , , . , :

  • SharePoint, ( ) -
  • , GUID, GetListItems() (. )
  • ( "" ) " "
  • " "
  • ( 9000) " " " , ".
  • "".

    Service.GetListItems(ListGuid, ViewGuid, , viewFields, RowLimit, queryOptions, null);

RowLimit Row, SharePoint, .

+1

, Google.

โ€‹โ€‹ . , sharepoint, .

var items = listSvc.GetListItems(listname, null, null, null, null, null);

var pager = items.ChildNodes[1].Attributes["ListItemCollectionPositionNext"] != null ? items.ChildNodes[1].Attributes["ListItemCollectionPositionNext"].Value : string.Empty;
var pagerXml = new XmlDocument();
pagerXml.InnerXml = "<QueryOptions><Paging ListItemCollectionPositionNext=\"\" /></QueryOptions>";
var pagerNode = pagerXml.GetElementsByTagName("QueryOptions")[0];

while (!string.IsNullOrEmpty(pager))
{
    pagerNode.ChildNodes[0].Attributes[0].Value = pager;
    var temp = listSvc.GetListItems(listname, null, null, null, null, pagerNode);
    foreach (XmlNode c in temp.ChildNodes[1].ChildNodes)
    {
        var c2 = items.OwnerDocument.ImportNode(c, true);
        items.ChildNodes[1].AppendChild(c2);
    }

    pager = temp.ChildNodes[1].Attributes["ListItemCollectionPositionNext"] != null ? temp.ChildNodes[1].Attributes["ListItemCollectionPositionNext"].Value : string.Empty;
}

, , : D

, , , . GetListItems() XmlNode, - :

<QueryOptions><Paging ListItemCollectionPositionNext="{paging-option}" /></QueryOptions>

{paging-option} - ( ) rs:data

+1

rowLimit 0

var rowLimit = "0";
var result = client.GetListItems("ListName", null, query, viewFields, rowLimit, queryOptions, null);

-. SharePoint, http. - IIS web.config SharePoint.

+1

All Articles