Solved

Value does not fall within expected range error

Posted on 2013-06-08
4
1,290 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
[X]
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
  • 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

688 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