Link to home
Start Free TrialLog in
Avatar of Isaac
IsaacFlag for United States of America

asked on

Value does not fall within expected range error

Hi All,
I am using SharePoint 2010

This is driving me crazy. Does anyone know why I get the following error:
User generated image
Here's the code:
function GetCurrentResult(measureTitle,fy,qtr)
	{		
	alert("Current Result Function measure title:"+measureTitle);
	alert("FY"+fy);
		$().SPServices({
			operation: "GetListItems",
			async: false,
			listName: "Current Results List",
			//CAMLViewFields: "<ViewFields><ViewFields/>",
			CAMLQuery:"<Query><Where><Eq><FieldRef Name='MeasureID' /><value Type='Text'>"+measureTitle+"</value></Eq></Where></Query>",
			  completefunc: function (xData, Status) {
			  alert(xData.responseXML.xml);
			  $(xData.responseXML).SPFilterNode("z:row").each(function(){   
   
					//var currResult = $(this).attr("ows_CurrentResultQtr"+qtr);
					var currResult = $(this).attr("ows_CurrentResultQtr"+fy);
					alert("CurrResult: "+currResult);
			  });	
		 }
		});

}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Isaac

ASKER

Ok.  That is the problem.  I thought the display name is used when it comes to the FieldRef and not internal name.
I do this for more than 10 years now, and still I have to recap each and every time where I have to use the Display name and where the Internal name.
Avatar of Isaac

ASKER

Thanks!