views:

35

answers:

1

I'm using AJAX to send a web service call to Sharepoint to retrieve list items.

I get the first page of results with:

    "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'&gt; \
        <soapenv:Body> \
             <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'&gt; \
                <listName>ListName</listName> \
                <rowLimit>10</rowLimit> \
                <query> \
                    <Query> \
                        <Where> \
                            <IsNotNull> \
                                <FieldRef Name='Title'/> \
                            </IsNotNull> \
                        </Where> \
                        <OrderBy> \
                           <FieldRef Name='Title' Ascending='True' /> \
                        </OrderBy> \
                    </Query> \
                </query> \
                <queryOptions><QueryOptions/></queryOptions> \
            </GetListItems> \
        </soapenv:Body> \
    </soapenv:Envelope>"

I can then use the bookmark in the results to go to the next page with:

    "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'&gt; \
        <soapenv:Body> \
             <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'&gt; \
                <listName>ListName</listName> \
                <rowLimit>10</rowLimit> \
                <query> \
                    <Query> \
                        <Where> \
                            <IsNotNull> \
                                <FieldRef Name='Title'/> \
                            </IsNotNull> \
                        </Where> \
                        <OrderBy> \
                           <FieldRef Name='Title' Ascending='True' /> \
                        </OrderBy> \
                    </Query> \
                </query> \
                <queryOptions><QueryOptions> \
                    <Paging ListItemCollectionPositionNext='" + bookmark + "'" + " /> \
                </QueryOptions></queryOptions> \
            </GetListItems> \
        </soapenv:Body> \
    </soapenv:Envelope>"

where bookmark is "Paged=TRUE&p_Title=BlahBlah;p_ID=5"

But I want to jump to, say, page 30, or the last page, so clearly I don't have the appropriate value for p_Title. I've tried adding the PageFirstRow variable with various numbers, but it does not change the result. If I omit the p_Title, I just get the first page again. Changing p_ID does nothing.

Any ideas?

Thanks, Joel

A: 

The documentation suggests that this is not possible.

The XML data returned by this method includes a ListItemCollectionPositionNext attribute inside the rs:Data element that contains the information to support paging. This string contains data for the fields in the sort and for other items needed for paging. You should consider this string internal and not to be modified; modifying it can produce unexpected results.

Sad really, but I guess the name of the attribute is accurate for it's function.

Nat