Search code examples
sharepointsharepoint-2010

CAML Query for lookup field with multi values


What is the caml query for a Lookup field with multi values?

So far, I am using the following without success (it just throws an error). My Lookup column is:

Lookup
-------
2;3
2
3;4

<Contains><FieldRef Name="LookupColumn"/><Value Type="LookupMulti">2</Value></Contains>

What is wrong with that query??


Solution

  • Include your query inside a Where clause/tag.

    <Where><Contains><FieldRef Name="LookupColumn"/><Value Type="LookupMulti">2</Value></Contains></Where>