2

The documentation for GetListItems says that if a viewName is not specified, it will use the default view for the list. Is there any way to get all the list data regardless of what view is specified?

Edit - Here is the SOAP request being made following the suggestions in an answer, but this doesn't return all the row data:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SOAP-ENV:Body>
    <tns:GetListItems xmlns:tns="http://schemas.microsoft.com/sharepoint/soap/">
      <tns:listName>{F54AF0C9-C473-433C-880A-EABB7625E3D6}</tns:listName>
      <tns:rowLimit>0</tns:rowLimit>
    </tns:GetListItems>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
1
  • You've got some namespacing going on (tns) that shouldn't be there. Look at /_vti_bin/lists.asmx?op=GetListItems to see what the packet should look like. Commented Sep 18, 2013 at 1:49

1 Answer 1

3
+50

You can break the connection with the default view by passing in any parameter. One easy one is to pass rowLimit = 0, which says to pass back all items. Or, you can use a query like

<Query>
   <Where>
      <Gt>
         <FieldRef Name="ID" />
         <Value Type="Counter">0</Value>
      </Gt>
   </Where>
</Query>

which means to pass all items with a non-zero ID, which is all items.

3
  • This doesn't seem to work for me. I'm essentially calling: GetListItems("{MyListGUID}", null, null, null, "0", null, null) and getting the same trimmed results as if I called: GetListItems("{MyListGUID}", "{MyDefaultViewGUID}", null, null, null, null, null) (also tried the query option to no avail).
    – Ocelot20
    Commented Sep 17, 2013 at 15:18
  • +1 for rowLimit=0. @user904 for a more specific answer you might want to show us your code.
    – Christophe
    Commented Sep 17, 2013 at 16:01
  • @Christophe: It's being called from a Flex application with an auto-generated service layer, so the code might not be very useful. I'll update the question with the SOAP request that's being sent.
    – Ocelot20
    Commented Sep 17, 2013 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.