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

Select Unique Items

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

6 REPLIES 6
v-micsh-msft
Community Support
Community Support

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.

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.

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

Unfortunately I did not.

martinfy
Regular Visitor

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

ericonline
Community Champion
Community Champion

Where oh where is Except!!

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Users online (2,353)