cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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

 

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.

Anonymous
Not applicable

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

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-Implementing-a-One-to/ba-p/200521

Anonymous
Not applicable

Thanks

 

 

@Anonymous 

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

 

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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,431)