UNION Function
What is the UNION function?
UNION FUNCTION returns all the values in an array. Or it will return all the values within two arrays.
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:
After clicking new flow, select ‘Instant Cloud flow’ from the dropdown:
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.
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",
"Charlie",
"Simba",
"Max"
]
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
[
"CHARLIE",
"TEDDY",
"BEAR",
"JASPER"
]
1# COMPOSE ACTION
Add ‘Compose Action’ to call ‘union function in it. it returns all values of array 1 and array 2.
INPUT:
In input, I call union function as mentioned below
CODE:
union(variables('CATS NAME'), variables('DOGS NAME'))
OUTPUT:
the output of the given function will be the sum of all values within 2 arrays. You can see output contains all names of cats and dogs.
0 Comments
Thanks for commenting. Your comment will be live soon after approval.