Power Automate Functions - Not Function

Power Automate Functions - Not Function

What is not function?

No function is used o return TRUE OR FALSE. If the argument is, true it will return false and if the argument is true it will return 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 - Not Function

Navigate to Flows:
Power Automate Functions - Not Function

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

After clicking new flow, select ‘Instant Cloud flow’ from the dropdown:
Power Automate Functions - Not 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 - Not 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 - Not Function

Add a Compose Action after initialization of variable:
The compose action call a function named as ‘contains’ as mentioned below.
Power Automate Functions - Not Function

CODE:
Contains (variables ('Name'), 'Sajid')
OUTPUT:
Power Automate Functions - Not Function

Now add another COMPOSE ACTION:
In this compose action add a function from the expression editor named ‘NOT CONTAINS’.
Power Automate Functions - Not Function

CODE:
not (contains (variables ('Name'), 'Sajed'))
OUTPUT:
Sajid is available in the Name but it will return false value
Power Automate Functions - Not Function

I add another compose action and call not contains function in it:
Although ‘Jami ’ is not available in the Name variable but it will return true.
Power Automate Functions - Not Function
not (contains (variables ('Name'), 'Jami'))

Output:
Power Automate Functions - Not Function

OR Function
What is OR function?
ALTERNATIVELY, Function checks both variables and return value, which is true. If both values are true, they will return true. If both values are false, return false. If one of them is true, it will return true.
Add two steps for INITIALIZE VARIABLES ACTIONS.

Return True = if both of the conditions are true
Return True = if one of them is true.
Return False = return false if both conditions are false.
Add an ‘INITIALIZE VARIABLE ACTION’:
Power Automate Functions - Not Function

Add another ‘INITIALIZE VARIABLE ACTION’:
Power Automate Functions - Not Function

Now add a COMPOSE ACTION to check the condition:
Power Automate Functions - Not Function


CODE:
or (contains (variables ('My Name'), 'Shehyar'), equals (variables ('Integer Value'), 6))

In composing action I call the ‘OR’ function and pass a value, which is not the exact value of the second variable
This means that one condition is true and the other is false. However, the OR function returns true.

0 Comments

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