I want to get all the items from my list, like this (A&B) AND (C&D), but my CAMLquery doesn't seem to work, here is what I've tried so far:
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml(
"<View>" +
"<Query>" +
"<Where>" +
"<And>" +
"<And>" +
"<Eq><FieldRef Name='Prioritet'/><Value Type='Text'>A</Value></Eq>" +
"<Eq><FieldRef Name='Status'/><Value Type='Text'>B</Value></Eq>" +
"</And>" +
"<And>" +
"<Eq><FieldRef Name='Prioritet'/><Value Type='Text'>C</Value></Eq>" +
"<Eq><FieldRef Name='Status'/><Value Type='Text'>D</Value></Eq>" +
"</And>" +
"</And>" +
"</Where>" +
"</Query>" +
"</View>");
Prioritet
andStatus
have 2 different values in an item i.e. it's checking ifPrioritet
has values A and C for the same item which is impossible. I'd suggest reformulating your query. – Akhoy Aug 10 '15 at 14:36