cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jojayaro
Frequent Visitor

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
Anonymous
Not applicable

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.

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.

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...

Thanks

 

 

@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.  

Anonymous
Not applicable

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (94,943)