Power Automate Functions - INTERSECTION Function

Power Automate Functions - INTERSECTION Function


INTERSECTION Function

What is the INTERSECTION function?

INTERSECTION FUNCTION is used to take out those values, which are the same in arrays one and two.

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 Apps:

Power Automate Functions - INTERSECTION Function

Navigate to Flows:
Power Automate Functions - INTERSECTION Function

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


After clicking new flow, select ‘Instant Cloud flow’ form the dropdown:
Power Automate Functions - INTERSECTION 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 - INTERSECTION 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.
1# INITIALIZE VARIABLE ACTION
INITIALIZE VARIABLE:
Initialize a variable having the following attributes. 
Name: set variable name
Type: set the type of variable as ‘array’
Value: set values as
[
"Oliver",
"Leo",
"Milo",
]
2# INITIALIZE VARIABLE ACTION
INITIALIZE VARIABLE:
Initialize a variable having the following attributes. 
Name: set variable name
Type: set the type of variable as ‘array’
Value: set values as
[
"Oliver",
"Leo",
"Milo",
"Charlie",
"Simba",
"Max"
]
1# COMPOSE ACTION
Add ‘Compose Action’ to call the ‘intersection function in it. It returns just those values, which are the same as UN array 1 and array two.
INPUT:
In input, I call intersection function as mentioned below
CODE:
intersection(variables('ALL CATS NAME'), variables('MY CATS NAME'))
Power Automate Functions - INTERSECTION Function

OUTPUT:
Go and test your flow using the test button. Before clicking on the test button save your workflow first then navigate to the next button. Here is the output related to our flow. It returns us just three names mean returns the first array. Because all elements of array 1 are in array 2, these same, values are why it extracts these names as output
Power Automate Functions - INTERSECTION Function


0 Comments

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