Select in Power Automate

In this post, we’ll look at the Select data operation in Power Automate! Make sure you’re subscribed to hear the last two data operations I’ll be covering tomorrow and on Friday! #365PostsIn365Days Upcoming It’s now down to the last three posts in this mini-series… READ MORE [https://lowcodelewis.c
silver magic keyboard
Photo by Lex Photography on Pexels.com
In: Low Code Lewis Content 🚀

In this post, we’ll look at the Select data operation in Power Automate! Make sure you’re subscribed to hear the last two data operations I’ll be covering tomorrow and on Friday! #365PostsIn365Days

Upcoming

It’s now down to the last three posts in this mini-series with the following upcoming!

Tomorrow – Filter Array

Friday – Creating CSV & HTML Tables

What is the select data operation?

Select, effectively lets us transform the shape of objects in an array. We can add, remove, rename and rearrange elements in each object within an array.

Note – You can add and remove elements using the select action but you cannot change the number of objects in the wider array.

Example

I’m going to make a call to Microsoft Graph using the HTTP step. But… this is going to give me back loads of data across all sorts of fields that I really don’t care about! So… I will then use a select to narrow down what I’m working with 🙂

You can see in this example, I’ve got a HTTP request. In this request I’m calling users from Microsoft Graph.

In your select step, you’ll want to use the from input to pass in your array of objects which in my case will be using the body dynamic content from my HTTP request step. Then we can move on to the map.

In the map, you’ll want to use the key fields for all of the column names, or what you want to rename them as, then use the value fields for that new columns corresponding value.

I want to end up with an output of just an array of objects with one field being the name. So I’m going to add ‘Name’ to a key, and the following value to its corresponding value.

item()['displayName']

Now if I run my flow, you can see my inputs are all of my fields and the data operation returns just an array of objects each of which only have my display name inside of them with my altered field name being ‘Name’.

Hopefully you found this post helpful, and you now have a better idea of how to use the select data operation in Power Automate.

Written by
Lewis Baybutt
Microsoft Business Applications MVP • Power Platform Consultant • Blogger • Community Contributor • #CommunityRocks • #SharingIsCaring
Comments
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to LewisDoesDev.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.