what is CAML ?

collaborative application markup language (camel) is XML based language which is used to query the data from signal list and multiple list& libraries.

We can use camel Query in SharePoint with Server Side Object model as well as in Client Side Object Model (CSOM).

Operators in SharePoint CAML Query:

Logical Operator -(AND, OR)

Comparison Operator(=< >?)


Comparison Operators in CAML Query:

Comparison OperatorsGeneral Meaning
Eq=
Gt
Lt
Geq>=
Leq<=
Neq<> 
ContainsLike
IsNullNull
IsNotNullNotNull
BeginsWithBeginning with word
DateRangesOverlapcompare the dates in a recurring event with a specified DateTime value, to determine whether they overlap

SharePoint CAML Query Syntax:

CAML Query syntax will be a new experience as compared to SQL queries. Everything in CAML Query is within < >. If you want to return specific items from List, your query must start with <Query> tag.

Below CAML Query will return all documents whose content type is My Documents.

<Where>

<Eq>

<FieldRef Name=’Content Type’/>

<Value Type=’Text’>My Documents</Value>

</Eq>

</Where>


Leave a Reply

Your email address will not be published. Required fields are marked *