This project has moved. For the latest updates, please go here.

Using two conditions in SPFilterDropdown CAML Query, is that possible?

Jan 21, 2014 at 4:48 PM
Hi Guys,

Thanks for all your help!

I’ve been using to put two conditions in the CAML Query for SPFilterDropdown and its not working. Am I supposed to use only one condition? Please help!!

When I use one of those conditions its working perfectly. Below is the code.

CAMLQuery: "<Where><And><Eq><FieldRef Name='Small'/><Value Type='Choice'>No</Value></Eq><Eq><FieldRef Name='Current'/><Value Type='Choice'>Active</Value></Eq></And></Where>",

Jan 21, 2014 at 5:14 PM
Whatever you pass in as the CAMLQuery is enclosed in <Where> in the function. Therefore, you should just pass in the CAML clauses you need, like so:
CAMLQuery: "<And><Eq><FieldRef Name='Small'/><Value Type='Choice'>No</Value></Eq><Eq><FieldRef Name='Current'/><Value Type='Choice'>Active</Value></Eq></And>", 
Jan 21, 2014 at 5:28 PM
It Worked.

Thanks Marc!! I really appreciate your patience and passion!