Skip to main content

Notifications

Power Automate Fundamentals # 34: Usage of and Function in Power Automate

Power Automate Fundamentals # 34: Usage of and Function in Power Automate

Introduction:

In Power Automate, at times we must validate two expressions and proceed further if both the expressions are true, in these scenarios and function is used. As an scenario, name of the person and lucky number values were taken to show and function behavior.

Step 1:

Login to the required Power Apps environment using URL make.powerapps.com by providing username and password and click on Flows on the left-hand side as shown in the below figure.

Usage of and Function in Power Automate Figure 1.jpg

Step 2:

After Step 1, Click on New Flow and select instant cloud flow and provide the trigger as Manually trigger a flow and click on Create as shown in the below figure.

Usage of and Function in Power Automate Figure 2.jpg

Step 3:

After Step 2, name the flow as And Function and take a parallel branch and add one initialize variable and name it as Set Name as Venkat  and provide values

Name: Name

Type: String

Value: Venkat

 

as shown in the below figure.

Usage of and Function in Power Automate Figure 3.jpg

 

Step 4:

After Step 3, on the other side of parallel branch and add one more initialize variable and name it as Set Lucky number as 5 and provide values

Name: Number

Type: Integer

Value: 5

 

as shown in the below figure.

Usage of and Function in Power Automate Figure 4.jpg

 

Step 5:

After Step 4, take compose action and name it as Verify Values and provide the input values with the following syntax of and function which returns true if both parameters are true

and(expression1: boolean, expression2: boolean) 

as

and(contains(variables('Name'),'Venkat'),equals(variables('Number'),5))

and click on ok / Update as shown in the below figure.

Usage of and Function in Power Automate Figure 5.jpg

Step 6:

After Step 5, now save the flow and test and run it and observe the result as true as both the expressions provided as arguments in and function returns true values as shown in the below figure.

Usage of and Function in Power Automate Figure 6.jpg

Note:

  1. Make sure to save and run the flow whenever you try expressions.

Conclusion: In this way we can validate any expressions and take decision if both the expressions are true by using and function in power automate.

Comments

*This post is locked for comments