Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8082451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:06:18+00:00 2026-06-05T17:06:18+00:00

I’m having trouble paging through a list via SOAP. I can retrieve a list,

  • 0

I’m having trouble paging through a list via SOAP.

I can retrieve a list, but it only ever returns the first 30 items. (which is the setting in the default view).

$methodName = 'GetListItems';
$listName = '{259134c5-fa87-441e-8c31-641b51193710}';
$camlQuery="";
$paging = urlencode('Paged=TRUE&p_ID=30');

$xmlAction = 
    '<GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
      <listName>' . $listName . '</listName>
      <query>' . $camlQuery . '</query>
      <queryOptions>
            <QueryOptions>
              <Paging ListItemCollectionPositionNext="' . $paging . '" />
            </QueryOptions>
          </queryOptions>
         </GetListItems>';

echo '<hr><h1>My Action is:</h1><pre>' . htmlentities($xmlAction) . '</pre>';

$client = new Nusoap_Client($wsdl,true);
$response = $client->call($methodName,$xmlAction);
echo '<hr><h1>Response:</h1><pre>' . htmlentities(print_r($response,true)) . '</pre>';

This returns a response like this, except there are 30 items.

Response:

Array
(
    [GetListItemsResult] => Array
        (
            [listitems] => Array
                (
                    [data] => Array
                        (
                            [row] => Array
                                (
                                    [0] => Array
                                        (
                                            [!ows_Region] => 7
                                            [!ows_District_x0020_ID] => 1902
                                            [!ows_District] => SOME ISD
                                            [!ows_Campus_x0020_ID] => 1902001
                                            [!ows_Campus] => MY H S
                                            [!ows_Grade_x0020_Range] => 09-12
                                            [!ows_FileRef] => 30;#sites/ti/Lists/Schools/30_.000
                                            [!ows_MetaInfo] => 30;#
                                        )

                                )

                            [!ItemCount] => 30
                            [!ListItemCollectionPositionNext] => Paged=TRUE&p_ID=30
                        )

                )

        )

)

The documentation says to get the next page, I need to provide the value returned in “ListItemCollectionPositionNext” and query again. That’s what the above is doing, and it returns the same 30 records. This list has 26K items in it.

Its not a permission issue. I’m an admin for this list and can manipulate it via the sharepoint web gui.

What else am I missing folks?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:06:19+00:00Added an answer on June 5, 2026 at 5:06 pm

    I wasn’t able to get paging to work but I was able to fake it using the ID column and rowLimit to filter the results of my list into pages.

    Query for the first ‘page’ of 50.

    <GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    <listName>{259134c5-fa87-441e-8c31-641b51193710}</listName>
    <query><Query>
                <Where>
                <And><Gt><FieldRef Name="ID"/><Value Type="Number">0</Value></Gt>
                <Leq><FieldRef Name="ID"/><Value Type="Number">50</Value></Leq>
                </And>
                </Where>
    </query></Query>
    <rowLimit><RowLimit>50</RowLimit></rowLimit>
    </GetListItems>
    

    and the second page of 50

    <GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    <listName>{259134c5-fa87-441e-8c31-641b51193710}</listName>
    <query><Query>
                <Where>
                <And><Gt><FieldRef Name="ID"/><Value Type="Number">51</Value></Gt>
                <Leq><FieldRef Name="ID"/><Value Type="Number">100</Value></Leq>
                </And>
                </Where>
    </query></Query>
    <rowLimit><RowLimit>50</RowLimit></rowLimit>
    </GetListItems>
    

    FYI: These queries are sensitive to new line characters.
    Make sure to do this all on one line.
    I split it apart to make it easier to read.

    This returns 50 rows.

     <rowLimit><RowLimit>50</RowLimit></rowLimit> 
    

    This returns an empty set. (or it did in my environment)

     <rowLimit>
     <RowLimit>50</RowLimit>
     </rowLimit>
    

    The settings of the default view don’t factor in. RowLimit appears to override it.
    There is a default limit of 5000 items in a single result set.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
We're building an app, our first using Rails 3, and we're having to build
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.