Issues with CAMLQuery

Nov 18, 2011 at 2:32 AM
Having trouble with the following code, CAMLQuery is the culprit as without it it works by selecting all records.
Can anyone see what is wrong?
	function SetButtonAction() 
 		var exists = false;
 		// Get list items from the PSR Standard Agenda List
  		$(document).ready(function() {
				operation: "GetListItems",
				async: false,
				debug: true,
				webURL: "http://pthsp01/PMO/2005 Toguraci",
				listName: "PSR Agenda",
				CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='PSRDate' /><FieldRef Name='Mandatory' /><FieldRef Name='Description' /><FieldRef Name='ListOrder' /></ViewFields>",
				CAMLQuery:  "<Query><Where><Eq><FieldRef Name='PSRDate' /><Value Type='DateTime'><Today /></Value></Eq></Where></Query>",
				completefunc: function (xData, Status) {
					$(xData.responseXML).find("[nodeName='z:row']").each(function() {
							// If there are any items here, disable New PSR Button
							exists = true;
			$('#Button1').attr('disabled', true);

Nov 18, 2011 at 12:50 PM


Try removing the <Query></Query> tags from your query.  It's been my experience that keeping those there prevents the query from working for whatever reason.  Hopefully that will help.