I want to create Caml Query for following scenario,
(Metadata Name ="Author1" AND Value="Nitin Jagtap") AND (Metadata Name ="Program" AND Value="MBA Finance")
.
I have tried but not able to create CAML query for same. I have used Caml designer for same but unable to get the proper result.
Following is the Caml Query which is generated by using Caml designer but it is not giving results
<Where>
<And>
<And>
<And>
<Eq>
<FieldRef Name='Metadata_x0020_Name' />
<Value Type='Lookup'>Author 1</Value>
</Eq>
<Eq>
<FieldRef Name='Value' />
<Value Type='Text'>Nitin Jagtap</Value>
</Eq>
</And>
<Eq>
<FieldRef Name='Metadata_x0020_Name' />
<Value Type='Lookup'>Program</Value>
</Eq>
</And>
<Eq>
<FieldRef Name='Value' />
<Value Type='Text'> MBA Finance </Value>
</Eq>
</And>
</Where>
I have a list having name “Metadata Values” which contains three columns,
- Content Name(Lookup column from Content List)
- Metadata Name(Lookup column from Metadata List)
- Value(Single line of text ) Each contains has multiple metadata and values like below,
From above list I want to get Content Name which satisfy the condition
(Metadata Name ="Author1" AND Value="Nitin Jagtap") AND (Metadata Name ="Program" AND Value="MBA Finance").
Please guide me regarding above scenario.
Any help will be appreciable.
Thanks, Nitin