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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Add collection items t...
Power Automate
Unanswered

Add collection items to dataverse table

(1) ShareShare
ReportReport
Posted on by 407

Hi all, 

 

I have a power apps that sends a collection to power automate. In this collection I have the data schema in this fashion:

 

AppName

AppId

Owner

Sub-app1

Sub-app2

Sub-app3

 

I need to add a row to dataverse with the appname to be the main row and add the sub-apps corresponding to the main app name

 

Then I would like to create a new row for each sub-app and add the other sub-apps to that including the main app. 

 

The idea that I'm trying to reach here is to have a user enter the app name and their sub-apps and the flow to create a corresponding app for each of the apps entered. So if I look up for sub-app1, it will display the other apps as part of its sub-apps regardless if it's the main app or not.

 

I hope it makes sense. 

 

Any help is appreciated.

Categories:
  • sandeepstw Profile Picture
    312 Moderator on at

    Hi There,

     

    To achieve your requirements in Power Automate and store the data in Dataverse, follow these steps:

     

    Start with a Power Automate flow that is triggered by Power Apps (assuming you've set this up already).

     

    Use the "Initialize Variable" action to create an array variable vArray to store the parsed collection from Power Apps. Use the "Set Variable" action to assign vArray the collection data from Power Apps.

     

    Use the "Create a new record" action targeting your Dataverse table. Populate the necessary fields, ensuring that AppName is set as the main row. This will be your parent record.

     

    Use the "Apply to each" action to loop through vArray. Inside the loop, for each Sub-app, use the "Create a new record" action to add a new row to Dataverse. Make sure to relate this record to the parent record created in step 3. For each Sub-app, also add references to other Sub-apps and the main AppName as required.

     

    Another "Apply to each" loop can be used inside the main loop. Here, you'll associate each Sub-app with all the other Sub-apps including the main AppName. Use Dataverse's relationship fields to establish these connections.

     

    Use the "Respond to Power Apps" action to send any confirmation or output back to Power Apps if needed.

     

    Please give kudos and mark as solution if it helps.  

      

    Thanks, 

    Sandeep Mishra 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 317 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 247

#3
Henil Profile Picture

Henil 117

Last 30 days Overall leaderboard