Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Value does not fall within expected range error

Posted on 2013-06-08
4
1,258 Views
Last Modified: 2013-06-08
Hi All,
I am using SharePoint 2010

This is driving me crazy. Does anyone know why I get the following error:
error
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

0
Comment
Question by:Isaac
  • 2
  • 2
4 Comments
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 39232154
Hi,
this error normally occurs if a FieldRef with this name does not exists. Can you please double check, if the internal name of the field is really "MeasureID"?
Perhaps you might attach the List schema XML (as you have done in another questions):
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_28134367.html#a39185813

HTH
Rainer
0
 
LVL 5

Author Comment

by:Isaac
ID: 39232164
Ok.  That is the problem.  I thought the display name is used when it comes to the FieldRef and not internal name.
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39232183
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.
0
 
LVL 5

Author Comment

by:Isaac
ID: 39232188
Thanks!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question