I'm using the SPServices GetListItems function to pull entries from a calendar list. All of the information is being retreived without any issues. However the RowLimit is not restricting the number of items being returned.

camlQuery = "<Query>"
                +"<CalendarDate>" + calendarDate + "</CalendarDate>
                        +"<FieldRef Name='EventDate' />"
                        +"<FieldRef Name='EndDate' />"
                        +"<FieldRef Name='RecurrenceID' />"
                        +"<Value Type='DateTime'>Month</Value>"
                    +"<FieldRef Name='EventDate' />"
  • You need to make sure that the Web application associated with the site does not have a row limit more than what you expect. – Joseph D Surgeon Oct 8 '14 at 15:01

In the SPServices library, you just need to add an option like this in your GetListItems configuration:

CAMLRowLimit: 6

Marc then tacks this onto the appropriate place in the dynamically built CAML query to get your data.

| improve this answer | |

Your <RowLimit> tag is inside <Query> tag which is wrong, it should be out side the <Query> and inside <View>.

Try below

camlQuery = "<View><Query><CalendarDate>" + calendarDate + "</CalendarDate><Where><DateRangesOverlap><FieldRef Name='EventDate' /><FieldRef Name='EndDate' /><FieldRef Name='RecurrenceID' /><Value Type='DateTime'>Month</Value></DateRangesOverlap></Where><OrderBy><FieldRef Name='EventDate' /></OrderBy></Query><RowLimit>6</RowLimit></View>";
| improve this answer | |
SPQuery query = new SPQuery();
query.RowLimit = 10;
SPListItemCollection items = list.GetItems(query);
| improve this answer | |
  • Love it when the simple answers work. – da_jokker Aug 19 '15 at 16:50

Can you try this CAMLRowLimit,

$(document).ready(function() {
    var idquery="<Query><OrderBy><FieldRef Name='ID' Ascending='False' /></OrderBy></Query>";
        operation: "GetListItems",
        async: false,
        listName: "test",
        CAMLQuery: idquery,
        CAMLRowLimit: 1,
        completefunc: function (xData, Status) {
        $(xData.responseXML).SPFilterNode("z:row").each(function() {
        var getvalue= parseInt($(this).attr("ows_Title"))+1;//Auto increment value


    <a href="http://peakfinders.blogspot.com/2015/10/how-to-get-id-of-last-inserted-row-in.html">more details</a>
| improve this answer | |
  • 1
    Can you please add some description of your answer. Just code do not give a clue. – Asad Refai Oct 7 '15 at 11:41

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.