开发者

CAML OrderBy for SharePoint Recurring Calendar Event

开发者 https://www.devze.com 2023-01-03 00:21 出处:网络
The following is the CAML query from a calendar view for a SharePoint list that I have.I have added an OrderBy statement that references two custom columns within the list.

The following is the CAML query from a calendar view for a SharePoint list that I have. I have added an OrderBy statement that references two custom columns within the list.

<Query>
    <Where>
        <DateRangesOverlap>
            <FieldRef Name="EventDate"/>
            <FieldRef Name="EndDate"/>
            <FieldRef Name="RecurrenceID"/>
            <Value Type="DateTime">
                <Month/>
            </Value>
        </DateRangesOverlap>
    </Where>
    <OrderBy>
  开发者_开发问答      <FieldRef Name="MyOrder"/>
        <FieldRef Name="MyTitle"/>
    </OrderBy>
</Query>

The OrderBy statement works fine for all events that are not recurring.

Can I use OrderBy with recurring events? If so, how?


Did you happen to try to sort descending by RecurrenceID? That field includes the date in the first half of the value.

0

精彩评论

暂无评论...
验证码 换一张
取 消