A few days ago I needed to build a CAML query that return all the items which have changed since the last execution. I have a Yes/No (boolean) field called “HasChanged” that when the item is changed turns to “True”.
The query would be something like this:
<query> <where> <eq> <fieldref Name="HasChanged"></fieldref> <value Type="Boolean">true</value> </eq> </where> </query>
The truth is that this query will not work as you might think. For Sharepoint, Yes/No fields are represented by 1 and 0. As so, the query has to be like:
Continue reading “[TIP – Sharepoint] – CAML Query – Filtering Boolean fields” »