Do you know how to check if a string is empty using Power Automate flow? Well, in this Power Automate tutorial, We will discuss how to check the condition if a string is empty using multiple conditions for example.
Let us check an example on the Power Automate condition if a string is empty.
Power Automate condition if a string is empty
Let us see how we can check the condition if a string is empty using Power Automate flow.
Here, we will create a variable to check if the task priority column which is of string data type is empty or not. And the flow will trigger when a new item is created or the existing item is modified on the SharePoint list.
To achieve this follow the below steps:
- Create a new power automated flow by selecting +New flow -> Automated flow then enter the flow name.
- Choose the trigger when an item is created or modified and click on the create option.
- Configure the trigger with the Site Address and List Name here I have selected my SharePoint site and the SharePoint list Name (TaskList).
- Select plus sign (+New Step)-> Add an action to initialize a variable for the task priority column:
- Enter the variable name as TaskPriority value and choose the data type as a string and add dynamic content value as TaskPriority Value in the value section.
- Click on the Next step and select condition control action to check if the task priority column has an empty value or not.
- Then we will add the condition if the Task priority variable is equal to empty then it returns true value else false value.
TaskPriority Variable is equal to empty
- TaskPriority Variable is equal to empty
- Operator: is equal to
- value: empty
- Save the flow and Click the flow checker to check if any error occurs in the flow or not. If there is no error Select Test-> Manually-> Save & Test.
Here we will Create a new item in the SharePoint list, with the empty Task Priority value as below:
In the below screenshot, you can see it returns a true value because the TaskPriority column contains an empty value.
This is how to check the condition if a string is empty using Power Automate flow.
Power Automate condition check if a string is empty
Here we will see how we can check the condition check if a string is empty using Power Automate flow.
Initially, we will create a variable to check if the task priority column which is of string data type is empty or not using multiple conditions in Power Automate flow. And the flow will trigger when a new item is created or the existing item is modified on the SharePoint list.
To achieve this using multiple conditions, follow the steps:
- Select +New flow -> Automated flow then enter the flow name. Choose the trigger when an item is created or modified and click create option.
- Configure the trigger with the Site Address and List Name here I have selected my SharePoint site and the SharePoint list Name (TaskList).
- Choose(+New Step)-> Add an action to initialize a variable for the task priority column:
- Enter the variable name as TPV and choose the data type as a string and add dynamic content value as TaskPriority Value in the value section as below:
- Then select condition control action and change the Condition to OR check if the task priority column has empty and secondly, we will check using the length formula.
- If the Task priority variable passes either one of the conditions then it returns a true value or else a false value.
TPV is equal to empty
- TPV is equal to empty
- Operator: is equal to
- value: empty
length(variables('TPV')) is equal to 0
- Length: Function name
- TPV: Variable name
- Operator: is equal to
- value: 0
Add two compose actions as below if yes then displays the yes it empty else not empty as highlighted below:
Select Test-> Manually-> Save & Test to test the Power Automate flow. We will modify the existing item in the SharePoint list, with the empty Task Priority value as below:
In the below screenshot, you can see it returns a true value because the TaskPriority column contains an empty value.
This is how to check condition check if a string is empty using Power Automate flow.
In this Power Automate tutorial, we have discussed how to check the condition if a string is empty and also covered the Power Automate condition check if a string is empty with an example.
You may also like:
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.