Error in SPFilterDropdown

Feb 11, 2014 at 11:28 PM
Edited Feb 11, 2014 at 11:29 PM
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.
Coordinator
Feb 12, 2014 at 2:24 AM
It should be Server_x0020_Name rather than Server_x0200_Name, but it may not be that simple? (Character 20 is an encoded space.)

M.
Feb 19, 2014 at 3:50 PM
Edited Feb 19, 2014 at 4:26 PM
Yeah, that needed to be fixed, but after doing so, I still get the error regarding the 'Title' field not being present in 'Master List'. Are there any prerequisites that I'm not meeting in regard to the relationshipList or relationshipListColumn? The 'Title' column is 'Text', as is the 'Status' column by which I'm trying to filter. Does the 'Status' column need to be a choice type for this to work?

New Code:
$(document).ready(function() {
$().SPServices.SPFilterDropdown({
relationshipList: "Master List",
relationshipListColumn: "Title",
columnName: "Server_x0020_Name",
CAMLQuery: "<Query><Where><Eq><FieldRef Name='Status'/><Value Type='Text'>Available</Value></Eq></Where></Query>", 
debug: true
}); 
Coordinator
Feb 20, 2014 at 2:55 AM
The Server Name column needs to be a lookup column to the Title column in Master List, which you say it is. Title is obviously present in Master List, as all lists have a Title. Any chance that you've renamed Master List and that's not its original name? (Check the URL.)

M.