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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,587)