Does your Power Automate flow need to filter only flagged documents using Yes/No (boolean) column and ignore the rest?
Did you try all possible combinations in the filter query …column eq true, …column eq ‘true’, …equals(column, ‘true’)… but none of them works?
While SharePoint is displaying the values as ‘Yes’ or ‘No’ to the users, and as ‘true’ or ‘false’ on the background, to make a working filter on Yes/No (boolean) column in Power Automate you have to use numbers, Yes = 1, No = 0.
That means you must define the filter in the following format.
YesNo_column eq/ne 1
or
YesNo_column eq/ne 0
Before I found this solution I had a lot of flows where the filtering was done after the Get items action. But moving the filter into the Get items action itself instead of using IF condition did simplify the flow, made it much faster and also much easier to debug when needed.
If also your flows have conditions like the one below, you too should consider optimizing them.
The solution i was looking for => Good article!
Thank you! This was a surprise and I struggled to get my filter to work until reading this.
i have multiple columns of YES NO in same SharePoint lint that case filter query is not working.
l am sending survey in YES / No option through Microsoft form, i am able to create item but when i used YES / No condition for email sending is not working.
Hello ganesh,
if it’s coming from MS Forms it comes as a text, not as a boolean – you should filter it using the text value.
You are a genius!! Thanks!!!
🙌🙌
I figured out how to do this for a SharePoint file.
For your “Select” action, you need to put the fx fuction to convert the boolean data type to an integer.
Format: int(item()[‘{IsFolder}’])
This will convert it so “0” is false and “1” is true.
Then, for the “Filter Array” action you must convert both values into an integer using the int() function.
From: @{int(item().IsFolder)}
Comparison: IS LESS THAN
Value: @{int(1)}
By checking if it is less than the integer “1”, you are checking if it is false.
This. Thought I had gotten mad.