Share via


Or Element

The Or element is used within the Where element to group filters in a query for a view.

Syntax

<Or>
</Or>
Parent Elements Child Elements
Where Eq, Geq, IsNull, Neq

Example

The following example performs a query for cases in which values of the Status field either do not equal Completed or are null. The results are sorted in descending order according to the Modified field.

<Query>
  <OrderBy>
    <FieldRef Name="Modified" Ascending="FALSE"></FieldRef>
  </OrderBy>
  <Where>
    <Or>
      <Neq>
        <FieldRef Name="Status"></FieldRef>
        <Value Type="Text"></Value>
      </Neq>
      <IsNull>
        <FieldRef Name="Status"></FieldRef>
      </IsNull>
    </Or>
  </Where>
</Query>

See Also

And

Query