Skip to main content
Community site session details

Community site session details

Session Id : IK85FhVylgKy2wxvWY1USt
Power Pages - General Discussions
Suggested answer

Auto connect records between tables

Like (0) ShareShare
ReportReport
Posted on 29 May 2025 20:16:33 by 2

Hello! So I have a problem that I'm trying to figure out and it feels like it should be easily possible, but its doesn't seem so and I'm not sure if I'm just missing something. 

So I have 2 tables. One is a table that's in a 1 to 1 relationship with the "Contacts" table, and ill call the table "Parent". The other being a many to one relationship with Parent, and ill call this table "Child". 

The set up for the pages would be a main page with the record associated with the currently logged in contact in Parent displayed. On this page there would be the list of the associated records in Child. There is then a button on the page that would take you to a form to create a new record in Child and have it automatically associated with the Parent record. 

That is the ideal behavior. So far I have the main page with the Parent record, but I'm unable to make any kind of visibility/permissions condition to have a list that only displays items with relationships to the current Parent record. I'm able to mimic this by just having them related to the "Contact" table, and this is OK but again, not ideal. The main thing I cant figure out is how to make it so that when the user creates a record in Child, it automatically creates a useable relationship to either the Parent record, or even the current users Contact if possible. I think I could do some shenanigans with power automate to connect them but id prefer to check this way to see if there's some default way to connect them, since I feel like relying on the current logged in user will cause more problems down the road.

Thanks!

Categories:
  • Suggested answer
    surya narayanan Profile Picture
    58 on 13 Jun 2025 at 09:39:42
    Auto connect records between tables
    Hi,
     
    Contact ↔ Parent ↔ Child structures). Unfortunately, Power Pages doesn’t handle indirect relationships (like Contact → Parent → Child) automatically, so yes — it feels like it should just work… but it needs a bit of wiring.
     
    Contact → Parent (1:1)
    Parent → Child (1:N)
    User is logged in as a Contact
     
    If You want:
    Show the Parent record associated with the logged-in Contact âś… 
    Show the list of Child records related to that Parent record ❌ 
    Allow creating new Child records auto-associated to the correct Parent record ❌ 
     
    Solution
    Step 1: Ensure Table Relationships
    You probably already have:
    Parent has a lookup to Contact (1:1 setup)
    Child has a lookup to Parent
     
    Step 2: Table Permissions Setup
    Here’s the key.
    You want to allow the logged-in Contact to see and edit Child records related to their Parent record.
    Configure Table Permissions for Child:
    Create a new Table Permission (Dev > Power Pages Management app)
    Table: Child
    Scope: Parent
    Related Table: Parent
    Parent Relationship: Child.Parent
    Then, on Parent, create another Table Permission:
    Table: Parent
    Scope: Contact
    Relationship: Parent.Contact
    “Allow the user to access Child records if their associated Parent is related to their Contact.”
     
    Step 3: Filter the Child Entity List on the Parent Page
    You're showing the Parent record (e.g., via an Entity Form or Web Template). Under it, place an Entity List of Child records.
    This will automatically filter to just show the Child records that match the Parent (based on permissions above) IF the Parent ID is passed properly.
    However, if it doesn’t auto-filter, you can also pass the Parent record’s ID in the query string and filter the list via FetchXML or JavaScript 
     
    Step 4: Link New Child Record to Parent Automatically
    You have a form for creating a new Child record. Here’s how to auto-populate the Parent lookup field:
    Use a Web Page URL Parameter + Metadata
    When user clicks “Add New Child”, link them to /create-child/?parent={{ parent_record.id }}
     
    In the Child create Entity Form, go to Form Metadata in Power Pages Studio:
    Add a Set Value for the Parent lookup field
    Set the value source to Query String
    Key: parent
    This will automatically link the new Child record to the correct Parent.
     
  • Suggested answer
    Fubar Profile Picture
    8,047 Super User 2025 Season 2 on 29 May 2025 at 22:01:15
    Auto connect records between tables
    On your dataverse Parent form add a Subgrid for its Child records. Then in the definition of the Power Pages form add a metadata record to the Basic Form / Step of Type = Subgrid, select the subgrid in question and then set the forms to be used for Create and Edit.
     
    The Power Pages form that you use to create the child record, also has additional settings that can set an associated table reference (depending on how you set things up you may not need to do this)
     
    You will also need appropriate Table Permissions to be created and added to the respective Web Roles being used (e.g. the create button for the subgrid will not be visible if the user doesn't have create permissions for the child 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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 2

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 2

#3
surya narayanan Profile Picture

surya narayanan 35

Loading complete