Use If Else conditional statements to handle the decision based on the condition defined. We will see them in action in Power Automate Microsoft Flow.
Create a new flow. I am creating a Manual Flow for this demo.
I will be creating a very simple flow having an if condition of checking if my number is greater than equal to 18. To start with, initialize a variable with name
number of type integer and default value 6.
Add a new Step
Condition. On the left side, add the variable
number from the Dynamic Content. Choose the condition
greater than or equal to. On the right side, give the value 18.
I will just add
Compose Step in both the places (If and Else) with different values. This is just for the understanding purpose.
Save the flow and run it manually. We will see both the test cases.
Negative Test (number = 6)
The condition (6 >= 18) becomes false. The flow goes to
If No. The compose output shows the value (6 < 18).
Positive Test (number = 19)
The condition (19 >= 18) becomes true. The flow goes to
If Yes. The compose output shows the value (19 >= 18).