cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft craig-martin
Microsoft

Select Unique Items

Is there a way to select unique items from an array?

6 REPLIES 6
Community Support Team
Community Support Team

Re: Select Unique Items

Hi @craig-martin,

 

Could you please explain a bit for the unique items here? If you mean an item filtered with some special condition, then I think the filter Array Action would work with your scenario.

Build more advanced flows than ever

 

Personally I think the selection from Array is not available.

The data being queried are not pre-loaded when configure the flow, so there is no data could be chosen from the array, 

Further, the data which would be loaded in array might change, the pre-configured item may not work.

what we could do when configure the Flow is working with conditions, or the available OData Query option, such as fiter query, orderby, or select query (in SQLServer).

If I misunderstand something, please let me know.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Microsoft craig-martin
Microsoft

Re: Select Unique Items

if an input is an array with items a,a,b,c,c then I'm wondering if an Action in Flow can output just the unique items, so a,b,c.

wratner
Level: Power Up

Re: Select Unique Items

Hey @craig-martin, did you ever figure out a way to filter just unique items? 

craigmartin
Level: Power Up

Re: Select Unique Items

Unfortunately I did not.

martinfy
Level: Power Up

Re: Select Unique Items

Hi,

Use the built-in union or intersection functions. They are both fast and require few steps:

intersection(variables(‘largeArray’),variables(‘largeArray’))

union(variables(‘largeArray’),variables(‘largeArray’))

See here for more details: https://medium.com/@martinfy/the-fastest-way-to-find-unique-items-with-flow-f9618ef7224

Super User
Super User

Re: Select Unique Items

Where oh where is Except!!

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 (4,955)