如何检查caml查询中的复选框?

时间:2013-05-29 15:53:21

标签: javascript sharepoint-2010 caml

在SharePoint 2010客户端对象模型(JavaScript)中,我使用此caml查询来下载列表项。

有一个名为'Office'的列,其中有几个复选框(即多选字段)。我希望获取Office字段中具有名称'Toronto'的复选框的项目。我不想考虑Office字段中其他复选框的值。下面的这个查询不起作用,因为我知道我应该得到更多的东西,因为我得到0项。

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>";   

有谁知道出了什么问题?

感谢。

1 个答案:

答案 0 :(得分:1)

我得到了解决方案:

<Value Type='Boolean'>更改为<Value Type='Text'><Value Type='MultiChoice'>

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