Sharepoint - REST API OData Filter on Boolean not Working

Try using 1 for true, 0 for false. I was able to replicate your problem in SPO, but using 1/0 worked fine:

/_api/web/lists/getbytitle('BtProjects')/items?$filter=Active eq 1

I thought I had already tried Active ne false but I guess I had not. That seems to work. It looks like the eq filter is broken for booleans, though.


Booleans are still broken when using SharePoint Online and the REST API. As of this writing, using 1/0 and true/false do not function as expected. When I tested, it actually returned the FULL dataset and ignored my $filter parameter.

Instead, I just created a choice column (with yes/no as options) and switched to that:

/_api/web/lists/getbytitle('BtProjects')/items?$filter=Active eq 'Yes'

Tags:

Rest

Filter