简体   繁体   English

SharePoint 2013 Rest API-扩展布尔类型的查找列时出错

[英]SharePoint 2013 rest api - error expanding lookup column of type boolean

The request url is: 请求网址为:

http://serverUrl/_api/web/lists/getByTitle('Weekstaten')/items(1)?$select=Id,Projecten/Klant,Projecten/OpLocatie&$expand=Projecten

Projecten is a MultiLookup field to another list. Projecten是另一个列表的MultiLookup字段。

When I want to expand a boolean field named OpLocatie , I get the following error: 当我想扩展名为OpLocatie的布尔字段时,出现以下错误:

The query to field 'Projecten/OpLocatie' is not valid. 对字段“ Projecten / OpLocatie”的查询无效。

This only happens with boolean fields. 这仅在布尔字段中发生。 I'm sure that the name of the field is correct and also the url. 我确定该字段的名称正确并且URL正确。

Could anyone points me the direction to follow to solve this issue? 谁能为我指出解决该问题的方向?

I've got the same problem with a single lookup. 我有一个单一的查找相同的问题。 For now I'll solve it by making some extra requests to fetch the boolean field. 现在,我将通过提出一些额外的请求来获取布尔字段来解决该问题。

When you create a calculated field in your Projecten list and use that field in your REST query it will work. 当您在Projecten列表中创建一个计算字段并在REST查询中使用该字段时,它将起作用。

The formula can be [OpLocatie] and the type can be string. 公式可以是[OpLocatie],类型可以是字符串。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM