New CAML operator in SharePoint 2010: IN

It took me 20 mins to work out why my CAML was working against 1 environment and not another.

It turns out because I was using the IN operator and that’s new in 2010 and not available in 2007.

This new operator is a god-sent, because no longer will you have to do multiple nested OR clauses.

Here is the link to MSDN for this operator: http://msdn.microsoft.com/en-us/library/ff625761.aspx.

Advertisements

About Bernado

Based in Australia, I am a freelance SharePoint and Dynamics CRM developer. I love developing innovative solutions that address business and everyday problems. Feel free to contact me if you think I can help you with your SharePoint or CRM implementation.
This entry was posted in CAML, SharePoint. Bookmark the permalink.

2 Responses to New CAML operator in SharePoint 2010: IN

  1. Martin Hevera says:

    Hello,

    I use IN operator in XsltListViewWebPart XmlDefinition on SP2010. It returns following error:
    ‘Error parsing CAML query – unknown operation’.

    Do you have any idea why?

    Here is my XmlDefinition:

    4
    5
    6

  2. Bernado says:

    Hi Martin,

    Appears the XML didn’t come through properly in your comment…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s