I have a custom content type in the Pages library of a publishing site, which contains two multi-value taxonomy fields. I'm trying to write a CAML query that will return any items from the Pages library that contain specific values in either of those taxonomy fields, i.e. return any items where taxonomy field 1 = 'X' or taxonomy field 2 = 'Y', so I'm using In clauses within an Or clause in my CAML query. The weird thing is that the In clause appears to be behaving like an And clause. For example the following CAML query only returns items when both the NewsLocation field contains the value in the first In clause AND the OperatingCompany field contains the value in the second In clause.
<Where> <Or> <In> <FieldRef LookupId='True' Name='NewsLocation' /> <Values> <Value Type='Integer'>1</Value> </Values> </In> <In> <FieldRef LookupId='True' Name='OperatingCompany' /> <Values> <Value Type='Integer'>3</Value> </Values> </In> </Or> </Where>
Have I got the CAML syntax wrong, or is there an issue with how In clauses work in Or clauses?
<Eq>when you only have one value in each?