0

I am wondering if the following CAML query structure is correct: I appreciate your help.

<Query>
  <CalendarDate><Today/></CalendarDate>
  <Where>
    <And>
      <And>
        <IsNotNull>
          <FieldRef Name="Unit" />      
        </IsNotNull>
      </And>    
      <DateRangesOverlap>
        <FieldRef Name="EventDate" />
        <FieldRef Name="EndDate" />
        <FieldRef Name="RecurrenceID" />
        <Value Type="DateTime">
          <Today />
        </Value>
      </DateRangesOverlap>
    </And>
    <And>
      <IsNotNull>
        <FieldRef Name="Primary_x0020_Expertise" />              
      </IsNotNull>
      <Or>
        <IsNotNull>
          <FieldRef Name="Secondary_x0020_Expertise" />
        </IsNotNull>
      </Or>
    </And>
  </And>
  </And>
  </Where>
  <OrderBy>
    <FieldRef Name="EventDate" />
  </OrderBy>
</Query>

CAMLQueryOptions:
<QueryOptions>
  <CalendarDate><Today/></CalendarDate>
  <RecurrencePatternXMLVersion>v3</RecurrencePatternXMLVersion>
  <ExpandRecurrence>TRUE</ExpandRecurrence>
</QueryOptions>
1
  • I have read people using caml query builder, may be for you also it might help.
    – Amit
    Nov 19 '13 at 4:49
0

Is this the complete CAML query?

There seems to be two extra </And> before </Where>

If you can share your List structure (with data types), then I can try it from my end.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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