- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个 SP2010 客户端应用程序进行 REST 调用。我有一个很大的列表,我想使用名为“显示”的无或多个选择字段的值进行过滤查询。我无权添加到此代码的服务器端代码。
当我“展开”查询时,我可以像这样访问选择的值
myDataVar.d.results[0].Displays.results[0].Value
因为将 1000 行拖到客户端来显示 20 行是残酷且不寻常的网络惩罚,所以我需要在 .Displays.results[0].Value
上过滤 d.results
。
我已经尝试过这个:
[site]/_vti_bin/Listdata.svc/MasterDataList?$filter=Displays/Value eq 'Wide'
我收到了错误消息
"No property 'Value' exists in type 'System.Collections.Generic.IEnumerable`1[[Microsoft.SharePoint.Linq.DataServiceEntity, Microsoft.SharePoint.Linq, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c]]' at position 9."
每another thread我已经尝试过
/_vti_bin/Listdata.svc/MasterDataList?$filter=DisplaysValue eq 'Wide'&$expand=Displays
错误:
位置 0 处的类型“Microsoft.SharePoint.Linq.DataServiceEntity”中不存在属性“DisplaysValue”。
测试不带“值”后缀的“显示”,错误为:
运算符“eq”与操作数类型“System.Collections.Generic.IEnumerable`1[[Microsoft.SharePoint.Linq.DataServiceEntity、Microsoft.SharePoint.Linq、Version=14.0.0.0、Culture=neutral、 PublicKeyToken=71e9bce111e9429c]]' 和位置 9 处的“System.String”。
<小时/>我再次陷入了 2010 年的困境,提前致谢。
最佳答案
您尝试的方法仅适用于非多选的选择列。不幸的是,REST 接口(interface)不支持多选选择列。显然,SharePoint 2013 也是如此。
FWIW,当我尝试从 SharePoint 中的 Angular JS 应用程序执行相同的操作时,我遇到了同样的问题。我最终创建了自己的多值选择字段实现,然后将结果数据以 JSON 格式存储在 SharePoint 的多行文本列内。这让我可以毫无问题地使用 REST 查询该字段。
关于javascript - 基于多选字段中的扩展列的 REST 查询(Listdata.svc),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39854033/
我正在尝试用 Swift 编写这段 JavaScript 代码:k_combinations 到目前为止,我在 Swift 中有这个: import Foundation import Cocoa e
我是一名优秀的程序员,十分优秀!