web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating single record...
Power Automate
Unanswered

Creating single record from array of records

(0) ShareShare
ReportReport
Posted on by 75

Hi Community!

 

I currently have an array the following format:

 

 

[
 {
 "sss_index": 1,
 "sss_name": "Project Overview",
 "sss_parentname": null,
 "sss_quotetemplateheadingid": "1b3cdc49-3e36-ee11-bdf5-00224891c295",
 "sss_tier": 1
 },
 {
 "sss_index": 1,
 "sss_name": "Project Summary",
 "sss_parentname": "Project Overview",
 "sss_quotetemplateheadingid": "6c0d2c51-3e36-ee11-bdf5-00224891c295",
 "sss_tier": 2
 },
 {
 "sss_index": 2,
 "sss_name": "Scope",
 "sss_parentname": null,
 "sss_quotetemplateheadingid": "b8d85c63-3e36-ee11-bdf5-00224891c295",
 "sss_tier": 1
 }

 

 

I'm looking to convert this into a single record, that looks like so:

 

 

{
 [sss_index]-[sss_name]:true
}

 or

{
 "1-Project Overview": true,
 "1-Project Summary": true,
 "2-Scope": true
}

 

 

Using Select, I am able to create an array of records like this:

 

 

[
 {
 "1-Project Overview": true
 },
 {
 "1-Project Summary": true
 },
 {
 "2-Scope": true
 }
]

 

 

But...I can't figure out how to create a single record out of the array.

 

Any ideas?

 

 

Thanks!

Brendan

Categories:
I have the same question (0)
  • SanmeshG Profile Picture
    1,947 Moderator on at

    Hi @Brendan1  ,

     

    Your current array has 3 objects and each object has the same columns with different values. 

     

    If you want to convert it to a single record which values you want to add for the columns(or properties in your new object)?

  • erofee Profile Picture
    75 on at

    Hi @SanmeshG ,

     

    I'd like to format the single record like so:

     

    {
     [sss_index]-[sss_name]:true
    }

     

    As an example of the end result i'd like:

     

    {
     "1-Project Overview": true,
     "1-Project Summary": true,
     "2-Scope": true
    }

     

     

    Any ideas?

  • SanmeshG Profile Picture
    1,947 Moderator on at

    Hi @Brendan1 ,

     

    If you original array has say 3 objects , then which value do you want to get/add for the new columns?

     

     

  • erofee Profile Picture
    75 on at

    @SanmeshG , the values I want in the record are a concatenation of strings from the previous records.  As I've demonstrated above.

  • Chriddle Profile Picture
    8,436 Super User 2025 Season 2 on at

    Something simple like this?

    Chriddle_0-1691998055157.png

     

    Comnpose code:

    {
     "inputs": {
     "@{outputs('Data')[0]['sss_index']}-@{outputs('Data')[0]['sss_name']}": true,
     "@{outputs('Data')[1]['sss_index']}-@{outputs('Data')[1]['sss_name']}": true,
     "@{outputs('Data')[2]['sss_index']}-@{outputs('Data')[2]['sss_name']}": true
     }
    }

     

    Outpu:

    {
     "1-Project Overview": true,
     "1-Project Summary": true,
     "2-Scope": true
    }

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard