CAML OrderBy for SharePoint Recurring Calendar Event

旧巷老猫 提交于 2019-12-10 11:16:39

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/3026378/caml-orderby-for-sharepoint-recurring-calendar-event

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!