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>
  • 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. – Marc D Anderson Sep 18 '13 at 1:49
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.

  • 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 Sep 17 '13 at 15:18
  • +1 for rowLimit=0. @user904 for a more specific answer you might want to show us your code. – Christophe Sep 17 '13 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 Sep 17 '13 at 18:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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