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

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

Top Solution Authors
Top Kudoed Authors
Users online (2,331)