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

New Post: Adding CAML Query results in no filtering at all

$
0
0

Thanks for the help and the quick response. I'm getting much farther now that I have a comma on the end. I'm actually a Javascript programmer so it is kind of embarrassing that I missed that. I also corrected the Field name also so that it said "Show_x0020_Active", which I verified is correct.

However, after adding the comma and fixing the field name I now get a message from spservices stating that "relationshipListParentColumn: Company or relationshipListChildColumn: Title" is "Not found in relationshipList Projects". That's weird because it doesn't give that message when I remove the CAMLQuery. Also, I know for a fact that there are some values in the project list that have Yes for the "Show Active" field. So, it shouldn't be returning an empty list or anything.

I liked the Boolean suggestion. So, I also tried creating a new field called Active? with a Boolean value and it still has the same message.

Here's my code now with the Boolean field I created in the Projects list. Keep in mind that I get the same error message whether I use the new Boolean value or the original Text value. Also, in both cases, if I remove the CAMLQuery there is no error and a list of projects for the currently selected company is returned. With the CAMLQuery I get nothing returned and the error message. Thanks for any additional guidance you may have.

 

<script src="/_layouts/jquery.js" type="text/javascript"></script>
<script src="/_layouts/jquery.SPServices-0.7.0.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function() {
		$().SPServices.SPCascadeDropdowns({
			relationshipList: "Projects",
			relationshipListParentColumn: "Company",
			relationshipListChildColumn: "Title",
			relationshipListSortColumn: "ID",
			parentColumn: "Company",
			childColumn: "Project Name",
			CAMLQuery: "<Eq><FieldRef Name='Active_x003f_' /><Value Type='Text'>1</Value><FieldRef /></Eq>",
			CAMLQueryOptions: "<QueryOptions><QueryOptions />",
			debug: true
		});
	});
</script>


Viewing all articles
Browse latest Browse all 6517

Trending Articles



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