0

We have a list with following fields:

FlagField : Yes/No DateField : Date only

I need to fetch two items from the list

  1. One where FlagField is set to Yes and DateField is latest (Descending order)
  2. One where FlagField is set to No and DateField is latest (Descending order)

From the first query I can create a CAML query like this.

<View>
    <Query>
        <Where><Eq><FieldRef Name="FlagField" /><Value Type="Integer">1</Value></Eq></Where>
        <OrderBy><FieldRef Name="DateField" Ascending="False"/></OrderBy>
    </Query>
    <RowLimit>1</RowLimit>
</View>

But how can I fetch both these items in a single query? Is it possible in SharePoint?

Your Answer

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

Browse other questions tagged or ask your own question.