【问题标题】:SharePoint order list item not a created date but order by AscendingSharePoint 订单列表项不是创建日期,而是按升序排列
【发布时间】:2014-03-06 17:53:18
【问题描述】:

我有以下 CAML 查询:

<OrderBy>
  <FieldRef Name='Glossary' Ascending='True' />
</OrderBy>

但输出是在创建日期对列表进行排序。如何根据自定义列打印列表项?

【问题讨论】:

    标签: sharepoint sharepoint-2010 sharepoint-list


    【解决方案1】:

    确保您将 OrderBy 放在正确的位置。您的 CAML 查询应如下所示:

    <listName>Program Roadmap: Tracking Development Hours</listName>
    <viewName></viewName>
    <query>
      <Query>
        <OrderBy>
          <FieldRef Name="Date" Ascending="true"></FieldRef>
        </OrderBy>
      </Query>
    </query>
    <viewFields>
      <ViewFields Properties="True">
        <FieldRef Name="ID"></FieldRef>
      </ViewFields>
    </viewFields>
    <rowLimit>0</rowLimit>
    <queryOptions>
      <QueryOptions>
        <DateInUtc>False</DateInUtc>
        <Paging ListItemCollectionPositionNext=""></Paging>
        <IncludeAttachmentUrls>True</IncludeAttachmentUrls>
        <IncludeMandatoryColumns>False</IncludeMandatoryColumns>
        <ExpandUserField>False</ExpandUserField>
        <ViewAttributes Scope="Recursive"></ViewAttributes>
      </QueryOptions>
    </queryOptions>
    

    【讨论】:

      猜你喜欢
      • 2022-12-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-24
      相关资源
      最近更新 更多