Question

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

Était-ce utile?

La solution

One issue I can see is below

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

It should be Type='Number'

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top