Have you started working with the Power Automate OData filter query? In this tutorial, I have explained how to use the Power Automate filter query boolean value, especially an example of “Power Automate OData Filter Query Yes/No“.
To filter items from a SharePoint list by using the Power Automate OData Filter Query Yes/No, a user can use the Odata filter query. Example: IsProjectCompleted_x003f_ eq 0 or IsProjectCompleted_x003f_ eq 1.
The steps to be followed to build a flow:
- Create an Automated cloud flow in Power Automate.
- Add Get items action under the trigger.
- After that, add a create HTML table.
- Save and Test the Power Automate flow.
- Output of the Filter Query.
Power Automate Filter Query on Yes/No Column
Usually, Microsoft provides filter query parameters in the ‘Get items‘ and ‘Get rows‘ actions, where it can filter and limit the data from a data source like a SharePoint list or SharePoint document library.
In Power Automate, these boolean values can be represented as Yes – True and No – False. However, OData never uses either Yes/No or True/False to filter the data from a SharePoint list.
In a SharePoint list, Yes value appears as a checked box, and True in Power Automate. Whereas No value appears as an unchecked box and False in Power Automate.
Syntax: ColumnName eq 1 for Yes/Checked/True ColumnName eq 0 for No/Unchecked/False
In Filter Query, Yes corresponds to 1, while No corresponds to 0.
Let’s check out the SharePoint list connected to Power Automate as a data source.
To work with this, I have created a SharePoint list named ‘Job Satisfaction Survey‘ with ‘Is Project Completed?’ as a Yes/No type column.
Scenario: Recently, a client required me to filter out the data from a list regarding a project that is not completed and has an “average” project status.
Follow the below instructions to build a Power Automate flow to filter out the data:
1. Open the Power Automate Home page to create an ‘Automated cloud flow’ with a trigger ‘When an item is created or modified’ and set the below details.
- Site address: Select a specific SharePoint site from the drop-down.
- List Name: Select a SharePoint list from a drop-down.
2. Under the trigger, add the ‘Get items‘ flow action under the trigger and provide the mentioned parameters.
- Site address: Select from the drop-down.
- List Name: Choose a SharePoint list from drop-down.
- Filter Query: Provide the filter query in the code below.
IsProjectCompleted_x003f_ eq 0 and ProjectStatus eq 'Average'
Where ‘IsProjectCompleted_x003f_’ is the internal name of a column.
Syntax format which does not support in Filter Query:ColumnName eq ‘Yes’
ColumnName eq ‘No’
ColumnName eq ‘true’
ColumnName eq ‘false’
3. To collect all the list items in a table, add a Create HTML table and set the custom column with values.
|Employee Full Name|
Is Project Completed?
|Select values from dynamic content of get items output.|
4. Once the flow is ready, click on Save and Test. Test the flow Manually.
5. Then, add an item to the SharePoint list; if there are no errors, the flow runs successfully. The outputs of the display details of list items that satisfy the filter query condition are below.
This is how to use the Power Automate OData query filter boolean values.
So, I hope through this tutorial, you got an idea of how to use Power Automate to get items Odata filter query using boolean values. I have explained “Power Automate OData Filter Query Yes/No” with a complete example.
You may also like:
- Power Automate Get Items Filter Query Date
- Power Automate Odata Filter Query Startswith
- Power Automate get items filter query equals null
- Power Automate get SharePoint list items count
Preeti Sahu is an expert in Power Apps and has more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.