< Query >
< Where >
< Eq >
< FieldRef Name="Roadmap_x0020_Address" / >
< Value Type="Lookup" > xyz < /Value >
< /Eq >
< /Where >
< /Query >
But, have not got the desired result because this query matches on the title of a lookup column, there there are cases where we can have a duplicate title. As we know that the lookup value structure is 12;#xyz, Instead of fetching by name we should look by ID
To fetch information by ID, we need use this switch LookupId=”TRUE”
< Query >
< Where >
< Eq >
< FieldRef Name="Roadmap_x0020_Address" LookupId=”TRUE” / >
< Value Type="Lookup" >12 < /Value >
< /Eq >
< /Where >
< /Query >
Another thing to remember is, the "FieldRef Name" we are using should be the internal name of a SharePoint column.
No comments:
Post a Comment