【发布时间】:2011-08-15 13:35:48
【问题描述】:
我有这个 CAML 查询
var query = new SPQuery
{
Query = string.Format(@"<Where>
<Or>
<Or>
<Or>
<Or>
<Contains>
<FieldRef Name='{7}' />
<Value Type='Text'>{3}</Value>
</Contains>
</Or>
<Contains>
<FieldRef Name='{6}' />
<Value Type='Text'>{2}</Value>
</Contains>
</Or
<Contains>
<FieldRef Name='{5}' />
<Value Type='Text'>{1}</Value>
</Contains>
</Or>
<Contains>
<FieldRef Name='{4}' />
<Value Type='Text'>{0}</Value>
</Contains>
</Or>
</Where>", "title", "adress", "zipcode", "city", "searchTitle", "searchAdress", "searchZipcode", "searchCity")
};
每次运行它并且我尝试使用 List.GetItems(query); 时都会引发此错误:
One or more field types are not installed properly. Go to the list settings page to delete these fields.
但是!如果我删除所有<Or> 标签,它可以工作并且不会抛出该错误,但我需要<Or> 标签来确保它获得所有命中。
我已确保所有字段引用 100% 匹配列的内部名称。
【问题讨论】:
标签: c# sharepoint caml