In my SharePoint CAML
query, when filtering with one input, it is successful. However, when I add in <Or>
to include one more input, it failed.
Below are the CAML
queries. Is the error due to wrong formatting of Multiple Input?
Single input (pass)
<Where>
<And>
<Eq>
<FieldRef Name="Header1Ref"/><Value Type="Text">H1</Value>
</Eq>
<Neq><FieldRef Name ="ContentType"/><Value Type="Text">"Document"</Value></Neq>
</And>
</Where>
Multiple input (fail)
<Where>
<And>
<Eq>
<Or>
<FieldRef Name="Header1Ref"/><Value Type="Text">H1</Value>
<FieldRef Name="Header1Ref"/><Value Type="Text">H2</Value>
</Or>
</Eq>
<Neq><FieldRef Name ="ContentType"/><Value Type="Text">"Document"</Value></Neq>
</And>
</Where>
Error:
One or more field types are not installed properly. Go to the list settings page to delete these fields. at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) at Microsoft.SharePoint.Library.SPRequest.GetListItemDataWithCallback2(IListItemSqlClient pSqlClient, String bstrUrl, String bstrListName, String bstrViewName, String bstrViewXml, SAFEARRAYFLAGS fSafeArrayFlags, ISP2DSafeArrayWriter pSACallback, ISPDataCallback pPagingCallback, ISPDataCallback pPagingPrevCallback, ISPDataCallback pFilterLinkCallback, ISPDataCallback pSchemaCallback, ISPDataCallback pRowCountCallback, Boolean& pbMaximalView) at Microsoft.SharePoint.SPListItemCollection.EnsureListItemsData() at Microsoft.SharePoint.SPListItemCollection.get_Count()