0

I am trying to get the last 100 items entered into a list with 13000 items in it.

I can pull items from another list on the same site fine but for this list it doesn't seem to get into the completefunc.

To try work out what's wrong I have used the below basic code. The ID field is indexed and the list name is two words with a space between them.

var myQuery = "<Query>" +
                  "<Where>"+
                     "<Eq>"+
                       "<FieldRef Name='ID'></FieldRef>"+
                         "<Value Type='Text>11000</Value>"+
                     "</Eq>"+
                  "</Where>"+
               "</Query>";
var fields = "<ViewFields><FieldRef Name='ID' /></ViewFields>";



$().SPServices({
webUrl: webUrl,
operation: "GetListItems",
async: false,
listName: "List Name",
CAMLQuery: myQuery,
CAMLViewFields: fields,
CAMLRowLimit: 100,
completefunc: function (xData, Status) {
    $(xData.responseXML).SPFilterNode("z:row").each(function() {
      console.log( $( xData.responseXML ) );
   });
 }

I have tested the query in SPCamlQueryHelper and it returns the expected results. Even larger queries work fine.

Any ideas?

Thanks

1

One issue I can see is below

"<Value Type='Text>11000</Value>"

It should be Type='Number'

  • Thanks works, I hadn't closed the 'Text' properly as well :) – tachi May 18 '16 at 2:47

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.