How to use the Select action in Power Automate
Add a Data Operation Select action, put your array in From, and build the new object in Map. Select returns a new array with the same number of items, each in the new shape.
What does the Select action do?
Select changes the shape of each object in an array. You can add, remove or rename fields. Microsoft states that Select cannot change the number of objects in the array.
A SharePoint Get items action returns many fields per row. Select lets you keep only the three you need before you email, join or loop over the rows.
How do you add a Select action?
- Select the plus sign (+), search for Select, and pick Select under Data Operation.
- In From, add the array. For SharePoint, choose value from Get items. If only 100 rows come back, see our guide on Get items returning only 100 items.
- In the left Map box, type the new field name, such as Title.
- In the right Map box, pick the dynamic content for that field.
- Select Add new item for each other field you want.
- Run the flow and open the Select action in run history to check the output.
How do you get a plain list of text values?
Select the switch icon on the Map box to change it to text mode. Now Map takes one value, not a key and value pair.
The output is an array of text, such as one email address per row. Pass it to a Join action to make a single string. For a split in the other direction, see our guide on splitting a string.
How is Select different from Filter array?
Select changes what each item looks like. Filter array changes which items stay. Select keeps the count. Filter array can reduce it.
To keep only some rows and trim the fields, use Filter array first, then Select. Fewer rows go into Select, so the flow does less work.
How do you use an expression in Map?
You can put an expression in a Map value. For example, formatDateTime(item()?['Due'], 'yyyy-MM-dd') writes a clean date. Use item() to point at the current row.
Wrap risky fields in coalesce() so a blank value does not break the run. See our guide on the invalid type error for null values.
Why does Select return the wrong result?
- From holds the whole Get items body, not value. Pick value.
- A person or choice column returns an object. Map its Value or Email field.
- The output looks like objects but you need text. Switch Map to text mode.
- A field is blank in some rows. Wrap it in coalesce().
- You expected fewer rows. Select cannot remove rows. Use Filter array.
What do you do with the Select output?
Common next steps are Create HTML table, Join, Compose or a Parse JSON action. Create HTML table turns the array into an email table. See our guide on formatting an HTML table.
The output is an array, so you can also loop over it with Apply to each.
FAQ
Can Select remove items from an array?
No. Select keeps the same number of items. Use Filter array to remove items.
Does Select change the original array?
No. It makes a new array. The source output stays as it was.
Can I output a list of text instead of objects?
Yes. Switch the Map box to text mode and enter one value per item.