Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Child Form within Parent Record Form

In PowerApps portals is there a way to include a child record form within the parent record and pass it parameters? not as a subgrid but more like an ASP.Net Repeater?


For example, my issue is I have an Application entity with multiple child Projects and the customer should be able to add child attributes (Costs and Funding) to the Project


Parent EntityChild Entity Relationship


I have set up the following forms

  • Application - includes subgrid of Projects
  • Project Costs - simple form with only a subgrid of Project Costs
  • Project Funding - simple form with only a subgrid of Project Funding

I have tried to make the user navigate from the Application to the child Project and add the Costs and Funding but the journey isnt great as they need to remember to navigate back to the application at the end of the process.


I then tried adding actions to the project subgrid (Edit Action (Add project costs) - renders Project Costs entity form, and similar for Funding). The problem with this is that it renders the Costs and Funding grids within a dialog which then when I click Add renders the Add form within a dialog in the dialog. 


Neither option is a good experience.


Is there a way to use {% entityform %} but to pass in an ID so that I can emulate the repeater like the example below



{% for project in appProjects.results.entities %}
    {% entityform "projects - costs" | id = project.Id %}
{% endfor %}







I am trying to wrap my head around the data model and your approach, so I might make some assumptions.


I think (and I might be wrong) is that you are depending on opening the "pop up" modal entity forms when it might make more sense to instead, from the entity list, open a new web page with an entity form.  The users would still need to navigate, but if done correctly could lead them along properly to add/edit info without getting lost.


Here is how I would do it;


You have a web page with the application entity form, which has a subgrid of projects.

The user can add or edit a project from the subgrid, but instead of a opening a modal entity form, I would recommend opening up this form on a whole new web page with a entity form for projects (you can configure this from the sub-grid options).  The submit process for the project form should redirect back to the application.

The project form (web page) can have the 2 subgrids, one for project costs, one for project funding.  From here, the add/edit for each subgrid could then open a modal entity form, and click OK would bring you back to the project page with the two entity lists. 

If a user clicks OK/Submit on the project form page, you need configure it to redirect back to the application page/form instead of just showing a success message.


If you want to eliminate all the page opening and redirection, because you are writing to multiple entities, that approach would require custom code, such as a custom HTML form and submitting data back to CDS via a companion app.  I have done this using an custom HTML form and a Power Automate http request, which updates multiple entities, but you have potential security issues.


I hope this helps!




Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,598)