1
votes

In SharePoint 2010 client object model (JavaScript), I am using this caml query to download list items.

There is a column called 'Office' and in it, there are several check boxes (i.e. its a multi-select field). I am looking to get the items where the checkbox in the Office field, that has the name 'Toronto' is checked. I don't want to consider the values of the other checkboxes in the Office field. This query below is not working though because I am getting 0 items, when I know I should be getting more.

var camlquerystring = "
<View>
<Query>
<Where>
<Eq>
<FieldRef Name='Office'/>
<Value Type='Boolean'>
Toronto
</Value>
</Eq>
</Where>
<OrderBy>
<FieldRef Name='Modified' Ascending='FALSE' />
</OrderBy>
</Query>
</View>";   

Does anyone know what is wrong?

Thanks.

1

1 Answers

1
votes

I got the solution:

Change <Value Type='Boolean'> to <Value Type='Text'> or <Value Type='MultiChoice'>.

Source: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopmentprevious/thread/b20b1945-4b73-4320-8666-957650dc6a20