【问题标题】:Selecting items from sharepoint list based on IDs using rest使用rest根据ID从sharepoint列表中选择项目
【发布时间】:2013-07-02 20:46:44
【问题描述】:

我正在尝试从 sharepoint 2010 列表中获取具有特定 ID 的项目列表。 我在javascript中使用以下查询Query /_vti_bin/listdata.svc/Absences?$select=AbsenceDate,AbsenceTime&$filter=indexof(Id,'67|68|') ne -1

我只想得到第 67 行和第 68 行。

我收到一个错误回复说 在位置 0 处找不到具有指定参数的“indexof”的适用函数。考虑的函数有:indexof(System.String, System.String)。

有什么想法吗?

【问题讨论】:

    标签: rest sharepoint


    【解决方案1】:

    这个article 非常适合如何使用过滤器:

    基本上,您想要执行 OR-Query,如下所示: /_vti_bin/listdata.svc/Absences?$select=AbsenceDate,AbsenceTime&$filter=(Id%20eq%20'67')%20OR%20(Id%20eq%20'68')

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多