Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CAML queries: how to filter folders from result set?

Tags:

I'm using caml query to select all documents which were modified or added by user. Query runs recursively on all subsites of specified site collection.

Now problem is I can't get rid of folders which are also part of result set. For now I'm filtering them from result datatable. But I'm wondering: Is it possible to filter out folders from result set just by using caml?

like image 233
Marian Polacek Avatar asked Dec 02 '08 08:12

Marian Polacek


1 Answers

This CAML actually does the trick:

<Where>     <Eq>         <FieldRef Name='FSObjType' />         <Value Type='Integer'>0</Value>     </Eq> </Where> 

that will not give you any folders.

like image 196
Johan Leino Avatar answered Sep 19 '22 03:09

Johan Leino