cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

Select Unique Items

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

6 REPLIES 6
Community Support
Community Support

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
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.

Highlighted
New Member

Re: Select Unique Items

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

Highlighted
New Member

Re: Select Unique Items

Unfortunately I did not.

Highlighted
Regular Visitor

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

Highlighted
Super User
Super User

Re: Select Unique Items

Where oh where is Except!!

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Users online (10,748)