Following the last blog, Learn CAML Statements Part 1, this blog looks at some of the CAML comparison operators that can be used within Collaborative Application Markup Language (CAML) queries. There are a few not listed i.e. In, Includes, NotIncludes, as these are not supported at present in BrightWork.
CAML Comparison Operators
In the example above, the <Eq> is a comparison operator. It looks to see if one value equals another. There are many different types available in CAML.
NOTE: CAML is case sensitive
|Assigned to is equal to ‘John Doe’|
|Assigned to is not equal to ‘Me’ i.e. the logged in user|
|Due Date is greater than ‘2017-06-13’|
|Greater Than or Equal To||<Geq>||</Geq>|
|Due Date is greater than ‘2017-06-14’|
|PercentComplete is less than 50|
|Less Than or Equal To||<Leq>||</Leq>|
|PercentComplete is less or equal to than 50|
|Assigned to is null / Assigned to contains no value|
|Is Not Null||<IsNotNull>||</IsNotNull>|
|Attachment is not null /Item has an attachement|
|Status contains ‘Late’|
|Priortiy begins with ‘(02)’|
Type = “Text”>
|The person listed in ‘AssignedTo’ is a member of the group ‘BrightWork Members’|
Over the coming weeks and months, I’ll post more about how you can use CAML code within BrightWork to advance the configuration of BrightWork Reports and metrics. If there is anything specific, please post in the comments below. Or search our blog to find more interesting articles on CAML, including Making use of Shared Filters and the Web Part Gallery.