myahia wrote:
Cheers,
Matthew
Thanks, Marc.myahia wrote:
What's the syntax? I'm new to CAMLQuery.
I looked at the documentation. It doesn't list CAMLQuery. Is this it?<Query> <Where> <Lt> <FieldRef Name="ID" /> <Value Type="Counter">3</Value> </Lt> </Where> </Query>
Your CAMLQuery is different than the original one you posted. Wrap in withvar htmlTable = '<table>'; $().SPServices({ operation: "GetListItems", async: false, listName: "Attributes", CAMLQuery: "<Eq><FieldRef Name='ID'></FieldRef><Value Type='Integer'>758</Value></Eq>", CAMLViewFields: "<ViewFields>" + "<FieldRef Name='Title' ></FieldRef>" + "<FieldRef Name='Values' ></FieldRef>" + "<FieldRef Name='ID' ></FieldRef>" + "</ViewFields>", completefunc: function (xData, Status) { $(xData.responseXML).SPFilterNode('z:row').each(function() { htmlTable += "<tr>" + "<td>" + $(this).attr("ows_Title") + "</td>" + "<td>" + $(this).attr("ows_Values") + "</td>" + "<td>" + $(this).attr("ows_ID") + "</td>" + "</tr>"; }) htmlTable += "</table>"; } });
<Query>
and <Where>
. I'd also like to see you change the value type to Counter
, but Integer
does seem to work FWIW.Cheers,
Matthew