In this Power Automate tutorial, we will see how to apply a filter query if blank using Power Automate. Let us start Power Automate Filter Query If Blank with an example.
Scenario:
The flow triggers manually and gets items from the SharePoint list, and then we use the filter query to filter blank values. Later, we use the update item action to highlight the blank values presented in the SharePoint list item.
Follow the below examples to achieve this:
Power Automate Filter Query If Blank
Let us see how to filter query if blank using Power Automate.
In this example, we are going to use the below Employee SharePoint List consisting of,
- EmployeeID – default title column
- EmployeeName – People Picker column
- EmployeeDesignation – Text column
- DateofJoining – Date column
- EmployeeStatus – Choice column
- ContactNumber – Number column
Example-1: (Single Line of Text)
In this example, we will check for blank value in a single line of text column in the SharePoint list using Power Automate.
Log in to Power Automate, create an Instant Cloud Flow, then select Manually triggered Flow. Then click on Create.
- So click on the Next step and select Get items action to retrieve all the items from the SharePoint list.
- Then Configure the SharePoint site address and list name.
- Then click on the Advanced option, in the Filter query field write the below query to get the items with a blank value. Here I will filter the blank value for the Employee Designation column.
EmployeeDesignation eq null
Select +new step, add apply to each control, and pass the dynamic value to loop through all the items in the SharePoint list.
- Then, add an Update item action, then configure the SharePoint site address and list name.
- Pass the dynamic content values of Id and Title in the required fields. In the Employee Designation field, pass the values as ##### to identify the blank values.
Save and run the flow by selecting the run flow option. Once the flow ran successfully, like below:
We can view the Employee Designation field with blank values updated with #####.
Example-2: (Choice Column)
In this example, I will show you how to filter choice columns for blank values in a SharePoint list in Power Automate.
In the same way, now we will filter the blank values for the Employee Status column and update it with #####.
In the Get items action, Filter query field, write the below query to get the items with a blank value for the Employee Status column.
EmployeeStatus eq null
Select +new step, add apply to each control, and pass the dynamic value to loop through all the items in the SharePoint list.
Add an Update item action, then configure the SharePoint site address and list name. In the Employee Status field, pass the values as ##### to identify the blank values.
Save and run the flow by selecting the run flow option. Once the flow ran successfully like below:
We can view the Employee Status field, which has blank values that have been updated with #####.
Example-3: (Number Column)
In this 3rd example, I have explained how to check for blank for a number type SharePoint list column using Power Automate.
Similarly, now we will filter the blank values for the Contact Number column and update it with 0.
In the Get items action, Filter query field, write the below query to get the items with a blank value for the Contact Number column.
ContactNumber eq null
Select +new step, add apply to each control, and pass the dynamic value to loop through all the items in the SharePoint list.
Add an Update item action, then configure the SharePoint site address and list name. In the Contact Number field, pass the values as 0 to identify the blank values.
Save and run the flow by selecting the run flow option. Once the flow ran successfully, like below:
We can view the Contact Number field, which has blank values updated with 0.
This is how to filter a query if blank using Power Automate flow.
In this Power Automate tutorial, we saw how to apply a filter query if blank using Power Automate flow with different examples.
You may also like:
- Power Automate Filter Query Operators
- Power Automate list rows present in a table filter query
- Power Automate SharePoint Get Items Filter Query
- Power Automate Skip Function
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.