用于SharePoint定期日历事件的CAML OrderBy [英] CAML OrderBy for SharePoint Recurring Calendar Event

查看:105
本文介绍了用于SharePoint定期日历事件的CAML OrderBy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是日历视图中针对我拥有的SharePoint列表的CAML查询。我添加了一个OrderBy语句,该语句引用了列表中的两个自定义列。

 < Query> 
< Where>
< DateRangesOverlap>
< FieldRef Name = EventDate />
< FieldRef Name = EndDate />
< FieldRef Name = RecurrenceID />
< Value Type = DateTime>
<月/>
< / Value>
< / DateRangesOverlap>
< /何处>
< OrderBy>
< FieldRef Name = MyOrder />
< FieldRef Name = MyTitle />
< / OrderBy>
< / Query>

OrderBy语句对于不是重复发生的所有事件都适用。 / p>

我可以对经常性事件使用OrderBy吗?如果是这样,怎么办?

解决方案

您是否碰巧尝试按RecurrenceID对降序进行排序?该字段在值的前半部分包含日期。


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.

这篇关于用于SharePoint定期日历事件的CAML OrderBy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆