in the above screen shot in the Compose 2 action named region - I am getting list of regions but contains duplicates.
I have to remove duplicates.
In one of the post it was said to remove duplicates use union on some variable.
I tried to do but . I tried adding Append to array variable but when I click on Name drop down list I don't see any.
what name I have to choose?
where should I initialize the variable.
It seems I can't initialize in ApplyToEach, I can only use append array variable.
Any help ?
i was able to figure it out. I was self referencing the same variable twice in the for each loop which was going in a cycle.
Also i am getting above error when i try to add Append to array variable
What should be the Join With ???
@v-bacao-msft , what will be the Join with value ?
Hi @ShivaPatpi ,
You could first append all regions to an array variable and then use the union() function to remove duplicate elements from the array.
Finally, you could use the Join action to extract regions.
Image reference:
Best Regards,
@ShivaPatpi or you can just use a Union expression which strips out duplicates from the 2 variables:
union(variables('varTown'),variables('varTownCounty'))
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
Hi @ShivaPatpi
Here is an example Power Automate to remove duplicates form an Array:
——————————————————
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional