tnkarthick
tnkarthick

Reputation: 15

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

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.

Upvotes: 0

Views: 4488

Answers (1)

LZ_MSFT
LZ_MSFT

Reputation: 4228

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

Upvotes: 3

Related Questions