SP2010 List View and CAML : Part 1

In Part 1; I will discuss about achieving List view by file type in CMAL query.

Let’s take an example that we have a Document Library which has different type of documents, images.

<Where>

<eq>

<FieldRef Name=”DocIcon”/>

<Value Type=”Computed”> your file type comes here </Value>

</eq>

</Where>

If you want to view all documents then CAML query will be like following:

<Where>

<eq>

<FieldRef Name=”DocIcon”/>

<Value Type=”Computed”> docx</Value>

</eq>

</Where>

Hope That helps..!!


Advertisements

One thought on “SP2010 List View and CAML : Part 1

Comments are closed.