sharepoint - CAML Query for multiple branches of "And-Or-In" statements -
sharepoint - CAML Query for multiple branches of "And-Or-In" statements -
i'm using caml query pull items list.
i tried re-arranging construction of query, , still not homecoming anything. seek not utilize camlquery builder (doing manually).
<query> <where> <and> <contains> <fieldref name="field1"/><value type="text">a</value> </contains> <and> <in> <fieldref name="field2"/><values><value type="text">b</value></values> </in> <or> <in> <fieldref name="field3"/><values><value type="text">c</value></values> </in> <in> <fieldref name="field4"/><values><value type="text">d</value></values> </in> </or> </and> </and> </where> </query> note: have seen questions may seem duplicate of this, have never seen question go deep level of branching. caml query seems particular in set closing tags.
did nest "and" , "or" incorrectly? wrong/missing in query?
while caml appears valid me (without actual <fieldref> , <value> elements, can't test field names, types & values), tend write caml in more "balanced" fashion, such:
<query> <where> <and> <and> <contains>a</contains> <in>b</in> </and> <or> <in>c</in> <in>d</in> </or> </and> </where> </query> according spec, both posted version & reply here net same result, test confirm. if above doesn't work, brevity aside, i'd suggest posting total caml can recreate list same field names & types , test info matching values.
sharepoint sharepoint-2010 caml
Comments
Post a Comment