cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jojayaro
Level: Powered On

How to create many child entries per each parent form?

I'm lost and I have not been able to find an answer for this.

 

I have an app that creates an "Incident Report" and stores the data in a Sharepoint List. However, I need to create several "Corrective Actions" for each "Incident Report" entry. Ideally, I would like to be able to create a link in the "Detail Screen" and/or "Edit Screen" that opens another form to create the "Corrective Action" entries for that "Incident Report" (I assume I can link both Lists using the "ID" of the "Incident Report"). If possible, I would also like the "Detail Screen" of each "Incident Report" to update to show the "Corrective Actions" that are tied to it as they are entered.

 

6 REPLIES 6
shailendra74
Level 10

Re: How to create many child entries per each parent form?

Hi @jojayaro 

 

You can create two SP list and have lookup field as a reference.

 

  1. Incident Report 
  2. Corrective Actions - create a lookup field which refers to #1

In PowerApps create

Screen #1  which displays list of incidents. onSelect you can navigate to Screen #2 which displays corrective actions. 

 

 

Thanks.

jojayaro
Level: Powered On

Re: How to create many child entries per each parent form?

Thanks for the prompt reply.

 

I'm still having issues. So I have 'Quality Report' and 'Corrective Actions' Lists in Sharepoint. I have created in 'Corrective Actions' a Lookup Column 'GetID' that is tied to column 'ID' in Quality Report.

 

So in Powerapps, in my 'DetailForm1' I have created a '+' button that takes me to a new Form to enter 'Corrective Actions'. However, when I create the new form is showing me all the 'GetID' options, I just want to show the ID for the selected Form that I clicked on the gallery.

Super User
Super User

Re: How to create many child entries per each parent form?

Hi @jojayaro 

You may want to find out some more information regarding how to implement one to many relationships in my community blog post. https://powerusers.microsoft.com/t5/PowerApps-Community-Blog/Relational-Database-Design-fundamentals...

jojayaro
Level: Powered On

Re: How to create many child entries per each parent form?

Thanks

 

 

Super User
Super User

Re: How to create many child entries per each parent form?

@jojayaro 

You can pass the ID in the Navigate() function as the optional third element from the gallery to a form on another screen. For example,

Navigate(Screen2, None, {selectedid: ID})

Put selectedid as the default property of the textbox in the foreign key field on the form.  Hide the card or use the card's DisplayMode propery disable it so that the user cannot change it.  

shailendra74
Level 10

Re: How to create many child entries per each parent form?

Hi @jojayaro 

 

In Corrective action screen select the edit form and in advanced tab set the "Item" property as 

 

LookUp('Corrective Action List', ID = Gallery.Selected.ID) // Gallery is from Report screen

 

if you are passing value selectedid you can say ID = selectedid

 

Thanks.

 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,370)