cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
prasadvenkat
Level: Powered On

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
Level 10

Re: Array variables - unique values

@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

5 REPLIES 5
SamPo
Level 10

Re: Array variables - unique values

@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

prasadvenkat
Level: Powered On

Re: Array variables - unique values

thanks.. that works

Highlighted
NazIM
Level: Powered On

Re: Array variables - unique values

What action would you place this formula under?

SamPo
Level 10

Re: Array variables - unique values

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'.
BastMani
Level: Power Up

Re: Array variables - unique values

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,070)