CAML Query that filters against a Lookup Column

<Where>
    <Eq>
        <FieldRef Name=”Category” />
        <Value Type=”Lookup”>My category</Value>
    </Eq>
</Where>

By ID:

<Where>
    <Eq>
        <FieldRef Name=”Category” LookupId=”TRUE” />
        <Value Type=”Lookup”>1234567</Value>
    </Eq>
</Where>

Comments

Popular posts from this blog

Change SharePoint Site Time Format

Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException", SharePoint exception after applying cumulative update\service pack

Get list of all users in a site collection and get all the web parts in a page