Power Automate Functions - IF Function

Power Automate Functions - IF Function

What is the IF function?

If the function returns a specific value if the result is in ‘TRUE OR FALSE’

It contains three parts:

1. Check if the condition

2. Perform If the condition is true

3. Perform If the condition is false

Description:

In this guide, we will discuss how to use the float function in power automation. Let us create a new flow. To create a new flow follow the following instructions:

Go to power Power Apps:

Power Automate Functions - IF Function
Navigate to Flows:
Power Automate Functions - IF Function

Click on the ‘New Flow’ button:
Power Automate Functions - IF Function

After clicking new flow, select ‘Instant Cloud flow’ form the dropdown:
Power Automate Functions - IF Function

Finally set its name and select ‘manually’ as flow trigger point:
In the below screenshot we set the Name of flow and its trigger point which is ‘Manually trigger a flow. Finally, click on the create button to create a new flow. 
Power Automate Functions - IF Function

First, add INITIALIZE VARIABLE ACTION:
To initialize a variable select initialize variable action from the actions set. Then set its properties the same as mentioned in the screenshot.
Power Automate Functions - IF Function

Add a ‘COMPOSE ACTION’:
Add a compose action and perform certain tasks like if the condition is true execute the ‘yes’ part and if the condition is false to execute the ‘No’ part of the function.
Power Automate Functions - IF Function

CODE:
if (contains (variables ('NAME'), 'MUHAMMAD'), 'YES THIS IS MY NAME', 'NO IT IS NOT MY NAME')
OUTPUT:
Power Automate Functions - IF Function

ADD ANOTHER COMPOSE ACTION:
Add another compose action that concat variable to another line like Concat variable ‘NAME’ + is my name
Power Automate Functions - IF Function

CODE:
If (contains (variables ('NAME'), 'MUHAMMAD'), 'YES THIS IS MY NAME', 'NO IT IS NOT MY NAME')
OUTPUT:
Power Automate Functions - IF Function


0 Comments

Thanks for commenting. Your comment will be live soon after approval.