温馨提示:本文翻译自stackoverflow.com,查看原文请点击:其他 - how to filter the list in REST API URL using Yes/No field
api boolean filter rest sharepoint-2013

其他 - 如何使用“是/否”字段过滤REST API URL中的列表

发布于 2020-04-03 23:56:23

我已经完成了可供选择的API,并且工作正常。

当我尝试过滤以下查询时,它无法正常工作。

?$filter=IsRequired eq 'Yes'

我收到错误消息:

$ filter = IsRequired eq 1“无效。

请检查并提出建议。

查看更多

提问者
tnkarthick
被浏览
100
LZ_MSFT 2020-02-03 08:55

要使用REST API过滤是/否字段,您需要使用下面的过滤器来实现。

$filter=IsRequired eq 1

REST API:

/_api/web/lists/getbytitle('listname')/items?$select=Title&$filter=IsRequired eq 1