Learn how to sort an array using Power Automate. In this post I share a Power Platform solution containing two example Cloud Flows demonstrating how an array can be sorted. I also briefly explore performance results of running actions in parallel verses serial with some surprising results.
Example V1 uses a branch within an ‘apply to each loop’ to complete the two ‘filter array’ steps in parallel, and then applies a union on the output values.
While, Example V2 completes the same step in series and then applies a union on the output values.
In both examples I have set the ‘apply to each loop’ concurrency control to ‘On’ and the degree of parallelism to 1.
You might expect Example V1 to be quicker than V2, however my test results show that V2 takes a constant 3 seconds to run while V1 takes between 4 to 5 seconds.
The solution containing the two Cloud Flows can be downloaded from my GitHub repro called sionjlewis / Sandpit-Sortng-An-Array.