How to Filter SharePoint Yes/No Columns in Power Automate with OData Filter Queries 理由

I was asked how to filter a “Yes/No” column in SharePoint using the “Get items” action in Power Automate, so here are my notes.

スポンサーリンク

Objective

This is about how to filter a SharePoint list in Power Automate when it contains a “Yes/No” (Boolean) column like in the image below.
SharePoint list example with Yes/No column

Filtering with true or false Does Not Work

Since the “Yes/No” column seems to behave like a Boolean, you might try to filter using true or false. However, this doesn’t work as expected.

For example, if you try to filter the SharePoint list above using false,
Attempting to filter Yes/No column with false
it looks like the filter is working properly,
Filter false appearing to work
but if you filter with true,
Attempting to filter Yes/No column with true
you get the same results.
Same filter result for true

How to Build: Filter Using 0 or 1

If you want to filter a “Yes/No” column in a SharePoint list, use the integer values 0 or 1 in your filter query.

For example, if you want to list only the rows where the “Yes/No” column is “Yes,” write your filter query using 1 as shown below:
Filter query with 1 for Yes
This will filter only the rows where the Yes/No column is “Yes”:
Only Yes rows are filtered
Similarly, if you filter with 0, you’ll get only the rows where the value is “No”:
Only No rows are filtered

Bonus: Filtering for “Not Equal”

If you want to filter for anything except “Yes,” you can use “ne 1” in your filter formula, as shown in the image below:
Filter for not equal to Yes/1
This will filter out all rows except those with “Yes”:
Filter result for not Yes

Related Articles

コメント

Copied title and URL