Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Error in SPFilterDropdown

$
0
0
I'm really not understanding why I get this error although it seems straightforward. Basically, I've got 2 lists. A server request list and a server master list.

The request list has a lookup column with name "Server_x0200_Name" that looks up off of the "Title" column of the Master List. There is also a status column in the master list that is a single line of text. I'm wanting to filter the Server_x0200_Name dropdown by the Status column.

Here is the code that I would think should be working:
<script language="javascript" src="/sites/Site1/scripts/jquery-1.10.2.min.js" type="text/javascript"></script>
<script language="javascript" src="/sites/Site1/Scripts/jquery.SPServices-2013.02a.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$().SPServices.SPFilterDropdown({
relationshipList: "Master List",
relationshipListColumn: "Title",
columnName: "Server_x0200_Name",
CAMLQuery: "<Eq><FieldRef Name='Status'/><Value Type='Text'>Available</Value></Eq>", 
debug: true
}); 
}); 
</script>
However, this code does nothing at all. It doesn't filter the dropdown and I get no error.

If I change the code to this:
<script language="javascript" src="/sites/Site1/scripts/jquery-1.10.2.min.js" type="text/javascript"></script>
<script language="javascript" src="/sites/Site1/Scripts/jquery.SPServices-2013.02a.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$().SPServices.SPFilterDropdown({
relationshipList: "Master List",
relationshipListColumn: "Title",
columnName: "Server_x0200_Name",
CAMLQuery: "<Where><Eq><FieldRef Name='Status'/><Value Type='Text'>Available</Value></Eq></Where>", 
debug: true
}); 
}); 
</script>
It still doesn't filter the dropdown, but I get an error:
"Error in function
SPServices.SPFilterDropdown
Parameter
relationshipListColumn: Title
Message
Not found in relationshipList Master List
Click to continue"


I've verified all of the column names via a CAML Query Helper and I'm able to successfully filter the master list with the CAML Query Helper using the query
<Where><Eq><FieldRef Name='Status'/><Value Type='Text'>Available</Value></Eq></Where>
But, I have no luck when using the SPFilterDropdown function. Any help would be greatly appreciated.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>