Power Automate OData Filter Query Yes/No (Boolean) Column

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:

  1. Create an Automated cloud flow in Power Automate.
  2. Add Get items action under the trigger.
  3. After that, add a create HTML table.
  4. Save and Test the Power Automate flow.
  5. 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.

Example:

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.

Power Automate Get items filter query using a boolean

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.
Power Automate filter based on Yes or No column

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’
Power Automate flow filtering get items for a Yes or No

3. To collect all the list items in a table, add a Create HTML table and set the custom column with values.

HeaderValue
Employee Full Name
Project Worked
Project Status
Is Project Completed?
Select values from dynamic content of get items output.
How to use Get items filter query with SharePoint Yes or No column

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.

Power Automate Filter Query boolean values

This is how to use the Power Automate OData query filter boolean values.

Conclusion

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: