CAMLViewFields is ignored

Mar 2, 2012 at 9:52 PM

Guys, 

I don't know why no matter what I set on CAMLViewFields, it always return all the fields in xData.responseText. Can anyone tell me why?

Thanks

 

Dennis

 

$().SPServices({

operation: 'GetListItems',

webURL: 'http://lbi-w-032/crops/cotton/',

CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",

async: false,

listName: 'Articles',

completefunc: function getData(xData, Status) { if (Status == "success") { console.log(xData.responseText); }}

});

Coordinator
Mar 2, 2012 at 10:02 PM

Dennis:

Unfortunately, even when you specify the columns you want, you still get a set of other columns anyway. The GetListItems operation seems to ignore the parameters which would prevent this. So in your example above, you'll see the Title plus a set of columns you didn't ask for, but not the other custom columns you might have in the list.

M.

Mar 6, 2012 at 3:07 PM

Thanks, M.