The equals function in Power Automate
The equals function is used to compare the two objects, whether they are equal or not. If they are equal, returns true, otherwise false. The equals function is case sensitive.
Power Automate Syntax equals(object1: any, object2: any)
Let’s create an array variable with name FirstArray, as shown in the image below.
Let’s create another array variable with name SecondArray, as shown in the image below.
To see the output, we are using the Compose action of power automate. Use the dynamic expression given below to equate the objects.
Power Automate
equals(variables('FirstArray'), variables('SecondArray'))
In the output in the compose action that it returns false as two arrays are not equal.
If we use the below power automate expression, it returns true as both are equal.
Power Automate
equals('Ashish', 'Ashish')
But, when we use the below power automate expression, it returns false as equals function is case sensitive.
Power Automate
equals('Ashish', 'ashish')
We can compare the integer values also,
Power Automate
equals(2024, 2024)
The above expression returns true as both are equal.