I have the value of a lookup column, but I don't have the ID, I want to query items from SharePoint list using the lookup value. How do I achieve that in CAML?
Default lookup query uses the value instead of lookup Id
The typical query looks like
<Query> <Where> <Eq> <FieldRef Name='RefCountry' /> <Value Type='Lookup'>India</Value> </Eq> </Where> </Query>
To query by ID you have o setup
LookupId='TRUE' attribute of
<FieldRef Name='RefCountry' LookupId='TRUE' />