Skip to content

Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Problems
  • Triggers
  • Application specific solutions
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Resources
Menu

How to select specific values from an array in Power Automate

Posted on February 2, 2022February 6, 2022 by Tom

“I’d like to copy a multiple choice SP field to another item, what’s the best way to select only the values from the array with Power Automate?”

“I need to extract only the user email addresses, I don’t need all the other user information.”


Working with Power Automate often involves working with arrays. Sometimes it’s a simple array, but more often it’s an array of objects. And with arrays of objects there’s a difference between what you get and what you can use. For example the SharePoint multiple choice column. You’ll get 3 properties for each of the choices, but you’ll need only the “Value”.

The same applies to multiple people picker. You get all the user information, but in most cases you need only the email address.

How do you then extract only the desired values, ideally in the required format?

Use the ‘Select’ action

The action you’re looking for is ‘Select’. You’ll input an entire array of objects and select what values it should return. The action has even an option to return a simple array with the values, or another array of objects.

Select only values

You can switch the action to return a simple array by pressing the small button – it’ll keep only 2 fields visible. Enter the whole array in the ‘From’ field, and select which value you want to return in the ‘Map’ field.

Power Automate select values from array

This is often used in combination with the join(…) expression to turn the values into a string. For example, if you want to send a single email to multiple users at once.

Select values and turn them into array of object

The other option is to return an array of objects. If you keep it in the original mode, with 3 fields, you can input the array, select what values it should return, and define the property key for the value.

Power Automate select values from array

This approach is used when you want to copy the values to another place and you need them in a specific format. For example, to update multiple people picker column or a multiple choice column.

Summary

‘Select’ is one of the most powerful actions in Power Automate, it’s the easiest way to get values from an array. Instead of looping through all the objects and appending the values in a variable, you can have a single action. All you need is to find the right format of the array, and ‘Select’ it accordingly.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

3 thoughts on “How to select specific values from an array in Power Automate”

  1. Beth Beck says:
    March 22, 2022 at 10:22 pm

    Hi Tom,
    I have been trying this with a multi-select choice field and the output of the Select action is just like yours, except for with my column “Building” and the building values. I then need to send an email with the building values listed in the body. I can’t figure out how to get just the values. I’ve created a Join action after the Select action, but the email body looks like this:
    {“Value”:”Building 1″},{“Value”:”Building 4″},{“Value”:”Building 7″}

    How do I remove all the “value” text and characters and just get Building 1; Building 4; Building 7

    Thanks,
    Beth

    Reply
    1. Tom says:
      March 27, 2022 at 7:08 pm

      Hello Beth,
      you should switch the ‘Select’ action to the text input only mode, without the Key value as shown on the screenshot.

      Reply
  2. Luke says:
    May 9, 2022 at 11:49 pm

    Thank you for this post! It has helped me immensely!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

NOW AVAILABLE:

The Ultimate Power Automate expressions cheat sheet
Spend your time thinking about what the flow should do, not how to do it!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Hello and welcome!

My name is Tom and I'm a business process automation consultant and Microsoft MVP living in the Czech Republic. I’ve been working with Microsoft technologies for almost 10 years, currently using mainly Power Automate, SharePoint, Teams, and the other M365 tools.

I believe that everyone can automate part of their work with the Power Automate platform. You can achieve a lot by "clicking" the flows in the designer, but you can achieve much more if you add a bit of coding knowledge. And that's what this blog is about.

To make the step from no-code Power Automate flows to low-code flows: using basic coding knowledge to build more complex yet more efficient flows to automate more of your daily tasks.

  • How to create a new SharePoint list column with Power Automate flowMay 22, 2022
  • How to combine expressions in your Power Automate flowsMay 18, 2022
  • Import Planner tasks with checklists into various buckets (Power Automate)May 15, 2022
  • How to get notified when Planner task was reassigned (Power Automate)May 11, 2022
  • How to extract value from XML using Power Automate flowMay 8, 2022

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

© 2022 Let's POWER Automate | Powered by Superbs Personal Blog theme