cancel
Showing results for 
Search instead for 
Did you mean: 

Sort Array

After fetching a list of items be able to sort the returned items before you use an Apply to Each.

 

You can filter an array.... Sort is the next obvious requirement.

 

 

Status: New
Comments
Kudo Collector

This is so frustrating.   Sorting an array was built-in Nintex back in 2007!   I have a large and complex query that I need to sort, but cannot find an action that sorts the array or even an expression... 😞

Kudo Commander

I found this manual for sorting an array:

http://johnliu.net/blog/2018/12/how-to-implement-sort-with-microsoft-flow-in-3-actions-within-a-loop 

 

 

But.... it should be a built-in function in flows. 

Kudo Collector

There is also another blog post as a work around https://sharepains.com/2020/03/05/sort-an-array-in-power-automate/

Advocate III

We need a Sort Array and a Deduplicate Array actions ASAP...

Regular Visitor

@testasdfasfsafa Deduplicating arrays can be done in one action using intersection().  An intersection of the array with itself will give you a deduped version.  This may or may not help your scenario, since it is only one action, it seems covered already, albeit not an obvious solution.

Kudo Collector

Deduplicating is not sorting. Maybe I want my duplicates and them sorted.

Regular Visitor

Is there still no built in action or function to sort an array?

Advocate III

I'm afraid no one is working on Power Automate or managing these forums...  Important and foundational items have been stale for years making this forums a digital cemetery for good ideas and feedback.  It's clear Microsoft has moved on and not letting us, the pioneers, know what is going on.