Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm using the U2U CAML Query Builder tool and no matter what I do, I can't create a query. It keeps generating the error: One or more field types are not installed properly. Go to the list settings page to delete these fields.0x81020014

If I just right-click on the list and do GetListItems, it works fine and returns results. By the way, it even throws the error when trying to create a query with the built-in Announcements list. Any ideas on what might be wrong?

Here's a sample one for the Announcements list that also throws the same error:

<Query>
   <Where>
      <Or>
         <IsNotNull>
            <FieldRef Name='Title' />
         </IsNotNull>
      </Or>
   </Where>
</Query>
<ViewFields>
   <FieldRef Name='ID' />
   <FieldRef Name='Title' />
   <FieldRef Name='Modified' />
   <FieldRef Name='Created' />
   <FieldRef Name='Author' />
   <FieldRef Name='Editor' />
   <FieldRef Name='_UIVersionString' />
   <FieldRef Name='Attachments' />
   <FieldRef Name='Body' />
   <FieldRef Name='Expires' />
</ViewFields>
<QueryOptions />
share|improve this question
2  
Does it throw an error in the Query builder? Or when using your query in sharepoint? Like Alexander said, you should delete the <Or> and </Or> tags –  Ruben Herman Oct 24 '11 at 11:09
    
It was the unneeded <Or>. Thanks, RubenHerman :) –  Alex C Oct 24 '11 at 11:40

2 Answers 2

up vote 6 down vote accepted

Remove the <or> or add a second clause to the <or>. In SharePoint CAML-queries you must have two (and only two) clauses in an <or> or <and> section.

In the U2U-Camlbuilder you can generate it like this: (Notice that filter is selected ) enter image description here

share|improve this answer
    
Thanks, Dribbel. That was it! But the error is so confusing I didn't realize my mistake. –  Alex C Oct 24 '11 at 11:39

I think that you should remove < Or > tag or add the second fild to the expression

share|improve this answer
    
Thanks, Alexander, that was it :) –  Alex C Oct 24 '11 at 11:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.