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
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.
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.
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.
2 thoughts on “0”
Been stalking your blog all the way from Belgium for a few weeks now.
Thanks for the constant flow of information 😉
Thank you so much for following my content! It’s really appreciated. You’re most welcome, here’s my post today on the 2023 Release Wave 1 plans for D365 & Power Platform! 🙂