web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Associate child record...
Power Apps
Unanswered

Associate child records with master record

(0) ShareShare
ReportReport
Posted on by 12

I have a gallery whose purpose is to allow the user to enter multiple child items as part of a master record (one to many relationship). The gallery is based on a collection and I have a button that patches the rows from the gallery to a separate SharePoint list. I am having a problem getting the child records to show up when I open the master record. I have tested it by creating a master record and adding some child records and then saving it. But when I re-open the master record, the child records are gone. How can I solve this? Thank you.

Categories:
  • joyle Profile Picture
    Microsoft Employee on at

    You should have shared:

    • Can you share your Patch expression?
    • Is there any filter in the master record form?
    • Have you tried creating the child records directly in the table and checking if they show up in the form?
  • TimV Profile Picture
    12 on at

    Patch expression: "ForAll(TCGUsersGallery.AllItems,Patch('TCG Users',Defaults('TCG Users'),{Title: GalleryFLEN.Text,UserName:GalUserName.Text,UserPhone:GalUserPhone.Text,UserEmail:GalUserEmail.Text,Role:Role:GalRole.SelectedItems.Value,MirrorUser:GalMirror.Text,SpecialInstructions:GalSI.Text}))

    The gallery Items property uses a Collection, called TCGUserCollection. Because of this, I thought that I needed to use the same Collection to display the stored child records when a user opens the master record. So, I created the Collection in the OnVisible property of the screen. But I can't figure out how to populate the collection with the values from the stored child records. I am using one screen which toggles between New and Edit FormMode, depending on whether the use clicks the "New" button or one of the item Titles in the SharePoint list.

  • TimV Profile Picture
    12 on at

    I should also say that I have verified that the child records are being created and stored in the separate SharePoint list. But they don't show up in the master record.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 220 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 139

Last 30 days Overall leaderboard