You are currently viewing Power Automate Check if field is null or empty
Check if field is null Power Automate

Power Automate Check if field is null or empty

Power Automate is a cloud-based service that allows users to create automated workflows between various applications and services. One common scenario in which Power Automate is used is to check if a field is null or empty in a particular data source, such as a SharePoint list or Excel spreadsheet.

This allows users to create more efficient and effective workflows, as they can avoid errors and incomplete data by ensuring that required fields are filled out before proceeding with the workflow. In this process, Power Automate uses conditions and actions to evaluate the data and execute the workflow based on the results.

Power Automate Check if field is null or empty

In this post, we will learn how to use If condition in Power Automate Check if field is null or empty.


Power Automate Check if field is null or empty

Power Automate’s If Condition is a logical function that allows users to specify a condition for executing a specific action based on specific criteria. In this section, we will explore how to use the If Condition to check if a field in a SharePoint list is empty or null when an item is being updated.

Scenario

Assuming that you have a SharePoint List called “Issue Tracker” that includes the columns mentioned below:

Power Automate Check if field is null

In this scenario, there is a field named “Date Reported” that is currently empty. To address this, it may be necessary to check whether the user has set a reported date when updating the item. If no reported date has been set, the flow can be configured to automatically set the “Date Reported” field to the current modified date.

There are two possible ways to achieve your objective in this situation:

  1. Using Calculated Column to check if field is blank, set the field to the modified date field.
  2. Or Using Power Automate Check if field is null or empty.

As previously mentioned, the main focus of this post is on the second method of using Power Automate to check if a field is null or empty.

How to Check if field is null Power Automate

To use Power Automate Check if field is null or empty, you have to follow the below steps:

Steps

  1. Open your SharePoint List, and from the above toolbar, click on “Integrate” > “Power Automate” > “Create a flow“.
create a flow in SharePoint List
  1. The suggested flow templates will be opened, click on “See More“, then select “When an existing SharePoint list item is modified, complete a custom action” template.
create a flow on item updated sharepoint
  1. The Power Automate portal will be opened, and if you are not sign in, provide your credentials to create your flow.
  2. Now, review the flow connectors, and if everything is OK, click on “Continue” to proceed.
manage connections in Power Automate
  1. The flow studio will be opened to build your flow, search for “Control
add condition control in Power Auotmate
  1. And from “Control“, click on “Condition” to add If Condition in Power Automate.
add if condition in Power Automate
  1. Great the If condition has been added, now click on the first textbox , and from “Dynamic Content“, select the field the you need to check if its value is null or empty as stated below.
if condition in Power Automate
  1. Now click at the second textbox, select “Expression“, and type “Null“, then press “OK“.
Power Automate Check if field is empty
Power Automate Check if field is null
  1. The final condition should looks like below
Power Automate Check if field is null or empty or blank
  1. At “If Yes” section, click on “Add an Action“.
If condition true in Power Automate
  1. Search for “Update Item“.
Update SharePoint Item in Power Automate
  1. Set the Site Address to the same site that contains your list.
Set site address in Power Automate
  1. Set the List Name yo your list.
Set list name in Power Automate
  1. Set the ID to the List Item ID as stated below.
Set list item id in Power Automate | Power Platform Geeks
  1. Repeat the above steps with the Title and any other required field.
  2. Now, at Reported Date field, set it to the created or Modified Date as per your needs.
update date field in Power Automate
  1. Save your flow.
Save Your flow in Power Automate
  1. Check for errors using Flow Checker.
Check flow error in Power Automate
  1. Great, there is no errors.
No errors in Power Automate
  1. Now, click on “Test” to test your flow.
Test your flow in Power Automate
  1. If it’s the first time that you test your flow, you will note that only manually option is available, so click on test to start the flow test.
Manually Test your flow in Power Automate
  1. Go back to your list to edit an list item, then click on “Save“.
Edit list item in Power Automate
  1. Great, the flow is run and the blank field has been updated successfully as shown below.
Power Automate Check if field is blank
Power Automate Check if field is blank

Conclusion

In conclusion, checking if a field in SharePoint List is empty using Power Automate can be a simple and effective way to automate processes and workflows.

By following the steps outlined in this post, users can create a flow that automatically checks if a specific field in a SharePoint List is empty and triggers specific actions based on the result. This can save time and improve efficiency by eliminating the need for manual checks and interventions.

See Also

Mohamed El-Qassas

I'm Microsoft MVP, SharePoint StackExchange Moderator, Microsoft QnA Moderator, C# Corner MVP, Microsoft TechNet Wiki Judge, and Senior Technical Consultant with +12 years of experience in SharePoint, Project Server and Power Platform.