Array Processing in Power Automate – Tip 2


Power Automate tips using the select action

Power Automate Select Action for array processing

Array processing advancement

Discover an even faster way to capture the array and maintain the ordering, using the “Select” action in Power Automate.

In Tip 1 for Array Processing, we looked at the following example:

Using a SharePoint list containing random survey answers, users give answers between 1-10. We want to capture the 500 latest submissions and put them into an array, to use in our Power Automate flow. We need to obtain the following fields question ID; the rating, and who submitted the answer.

Power Automate Tip 1 used concurrency on the workflow to run the loop in batches. This greatly increased speeds and reduced them from 4 minutes to 32 seconds.

Although this solution is simple and effective, it neglects the ordering of those records.

Steps to using Select Action in array processing

Workflow step 1

You will need to begin in the same way as Tip 1, by using the “Get Items” action. This will get items in the SharePoint List.

Give the list a top count of 500 items, ordering the list into descending order, based on the ID. 

Tips and Tricks for Array Processing in Power Automate

Workflow step 2

Initialize a variable named “MyArray” to store your information.

This is where the Select Action comes into play

Utilise the “Select” action by inputting a table of data, specifically focusing on the values retrieved from the “Get items” action. Assign these values to names of your preference.

Set the output of the “Select” action to the MyArray variable.  

Select action tip 2

The results

The flow now runs in under one second!

This is made possible by the Select action filtering the table, rather than processing each record, producing a far faster workflow. 

Power automate select action tip 2

For more information from Microsoft on Power Automate – click here

Published On: April 18th, 2024 / Categories: Power Automate /