Warm tip: This article is reproduced from stackoverflow.com, please click
api boolean filter rest sharepoint-2013

how to filter the list in REST API URL using Yes/No field

发布于 2020-04-03 23:36:38

I have done API for select and it is working fine.

When I tried to filter I used below query it is not working.

?$filter=IsRequired eq 'Yes'.

I am getting error:

$filter=IsRequired eq 1" is not valid.

Kindly check and suggest.

Questioner
tnkarthick
Viewed
83
LZ_MSFT 2020-02-03 08:55

To filter the Yes/No field using REST API, you need use the filter below to achieve it.

$filter=IsRequired eq 1

REST API:

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