Set multiple conditions in a conditional branch
Power Automate Desktop has several data types internally, although they aren’t shown explicitly when you configure actions, so users don’t need to think about them.
This article explains how to use one of them, the Boolean type, which returns True or False, to set multiple conditions in a single If statement.
About the Boolean type
Section titled “About the Boolean type”If you use “Set variable” and enter “%True%” or “%False%” directly in “Value,” or enter something like “%1 + 1 = 2%” or “%3 + 2 = 6%,” the variable is stored as a Boolean.
You can use AND and OR with Boolean values to calculate a new Boolean value.
If you use “Set variable” and set “Value” to “%FirstBooleanVariable AND SecondBooleanVariable%,” you can define a Boolean value that’s True only when both are True.
So when you use this in an If statement, you can apply multiple conditions by setting the parameters as follows.
Implement by copying and pasting
Section titled “Implement by copying and pasting”Copy the following code and paste it into the Power Automate Desktop flow designer to add the actions.
SET Condition1 TO 1 + 1 = 2SET Condition2 TO 2 + 3 = 6IF (Condition1 AND Condition2) = True THEN SET Result TO $'''Matched'''ELSE SET Result TO $'''Did not match'''ENDImplement in Power Automate Desktop
Section titled “Implement in Power Automate Desktop”-
In “Search actions,” type “Set variable” and set the parameters as follows.
Parameter Value Variable Condition1 Value %1 + 1 = 2% -
Add another “Set variable” action and set the parameters as follows.
Parameter Value Variable Condition2 Value %2 + 3 = 6% -
In “Search actions,” type “If” and set the parameters as follows.
Parameter Value First operand %Condition1 AND Condition2% Operator Equal to (=) Second operand %True%