cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
prasadvenkat
Helper I
Helper I

Array variables - unique values

I am trying to get only the unique values from array variable (of strings) into a list so I can create html and email. Is this possible to get this through an expression? 

1 ACCEPTED SOLUTION

Accepted Solutions
SamPo
Impactful Individual
Impactful Individual

@prasadvenkat use the 'union' expression to combine the array with itself to get a result of unique values. For example: 

 

union(outputs('myArray'),outputs('myArray'))

 

Hope this helps

 

Sam

View solution in original post

10 REPLIES 10
SamPo
Impactful Individual
Impactful Individual

@prasadvenkat use the 'union' expression to combine the array with itself to get a result of unique values. For example: 

 

union(outputs('myArray'),outputs('myArray'))

 

Hope this helps

 

Sam

View solution in original post

thanks.. that works

NazIM
Frequent Visitor

What action would you place this formula under?

SamPo
Impactful Individual
Impactful Individual

You can place it wherever you want to display or use the output. The simplest option is to use the 'compose' action. You could also use a variable of type 'array'.

 

hi

i have used the same above but not able to get unique array.

Screenshot_3.png

 

 

SamPo
Impactful Individual
Impactful Individual

@Achavan It looks like you're trying to wrap your array variable in another array.

 

Remove the array function and just use:

union(variables('Customer Array'),variables('Customer Array'))
rishiverma12
Microsoft
Microsoft
Powerplatform01
Post Patron
Post Patron

@prasadvenkat 

Hey you can watch this video to resolve your issue.

Also request you to please subscribe this power Automate channel

https://youtu.be/HFghBAYX-oQ

@prasadvenkat 

Request you to please subscribe my power Automate channel

https://youtu.be/HFghBAYX-oQ

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,627)