Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a custom Site page that contains some javascript code (using jquery and SPServices), that calls Lists.asmx Web service to perform CRUD operations on the list. At the init, my js code needs all list items. Recently I notided, that the latest added list items are not returned. Using Fiddler, I investigated that they are not simply included in the result set. As older items seem to be useless for my code, there's a simply solution just to clear them. But the question still remains, if the Lists.asmx has any limit of the items to return, and if it has how to configure it. Thx in advance.

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

I assume you're using Lists.GetListItems to get the list items.

In the call the rowLimit specifies how may items you maximum want returned. If it's not specified, then the rowLimit is taken from the view with the Id specified in viewName, if that isn't specified then from the default view.

The query parameter can be used to limit the selection based on a CAML query (see the answer from @JohnChapman) and can also specify the order, so you get the newest items first.

share|improve this answer
add comment

You need to specify the number of results in the CAML query sent to the Lists web service. SharePoint Magazine had a good article about using CAML queries against the web service: http://sharepointmagazine.net/articles/writing-caml-queries-for-retrieving-list-items-from-a-sharepoint-list. In addition, the MSDN documentation on the CAML query schema might be helpful for you: http://msdn.microsoft.com/en-us/library/ms467521.aspx.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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