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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Relationship chaining
Power Apps
Unanswered

Relationship chaining

(0) ShareShare
ReportReport
Posted on by

I am looking to show information on a form or view about a tables related tables. For example, a car entity has a one to many relationship with manufacture entity who in turn has a one to many relationship with a parent company entity. I would like on the view for the car entity to show information about the parent company. Anyone know of a way to drill up the chain of relationships?

 

In pseudocode it would be something like: Car.Manufacturer.ParentCompany.Name 

I have the same question (0)
  • cchannon Profile Picture
    4,702 Moderator on at

    I would probably chain together Form Component Controls or Quick View Forms.

     

    A Form Component Control lets you almost IFrame in a form from a related entity, which is part of what you're looking for. It does not do multiple hops on its own though, so you would have to chain a couple together. The idea is from Entity 1 you make a FCC form or a Quick View form and you display it on a special FCC for for entity 2, then on entity 3 you have a FCC that shows the special form of entity 2, which is really just a FCC/QV of entity 1.

     

    cchannon_0-1632484759828.png

     

     

     

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @4th8,

     

    I have had this type of situation a number of times in projects and what I have really always done to simplify my world, provide the best ability to add related columns to views etc on the "Car" entity etc. is to actually add the Manufacturer and Parent Company to my Car entity as well.  So I would have two lookup columns on the Car entity for the direct parent and the grandparent. 

     

    If your entity's parent can change then you have to watch for this or put code specifically (in workflow for example) that when the user changes the parent that it will automatically look at the parent's parent and change that grandparent value on the Car record.

     

    Overall keeping these multiple levels of relationships (although not the best normalization) has allowed the best flexibility in my applications and I have never regretted doing this on a single project.  I have some where it is 4+ levels deep.

     

    I then utilize Quick Views on the forms to show the information from the related entities and on the Views I can utilize the related entities and add the columns as needed.

     

    Hope this helps.  Please accept if answers your question or Like if helps in any way.  

     

    Thanks,


    Drew

  • 4th8 Profile Picture
    on at

    @dpoggemann This sounds like a good solution. Could you please explain a bit further as to how i would set the grandparent fields based on the value of the parent fields?

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    The normal way I do this is utilizing Attribute Mapping from the relationship definition.  You can open up the relationship definition and you will see "Mappings" where you can define the mappings from the parent to the child entity.

    attribute_mapping.jpg

     

    This will work when you create the Child when in the Parent entity under a specific Subgrid or the Related Tab. 

     

    Hope this helps.  Please accept if answers your question or Like if helps in any way.


    Thanks,


    Drew

  • cchannon Profile Picture
    4,702 Moderator on at

    @dpoggemann is right: attribute mapping is the standard way to do this, and by far the easiest. But, it does have some limitations. Namely, if you create the child then attach it to the parent, or create the child from a context other than the parent record, the mappings will not carry through.

    These are not the standard pathway, so normally field mappings will be the right solution. But if you need to support indirect parenting of the child record like this, then you can also just configure a PowerAutomate Flow to look up the grandparent value and populate it.

  • 4th8 Profile Picture
    on at

    @dpoggemann How do i find that relationship definition screen? 

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @4th8 ,

     

    1.  Go to your Solution

    2.  Choose from menu "Switch to Classic"

    dpoggemann_1-1632942254157.png

     

    3.  Choose your N:1 relationships on the Child Table

    dpoggemann_2-1632942505308.png

    4.  Double click on this relationship to show detailed page for definition of the relationship (you will see Mappings on the left side of the screen)

    dpoggemann_3-1632942571016.png

    5.  Click on the "New" to define mapping from the Parent to the child

    dpoggemann_4-1632942649210.png

     

    Hope this helps.  Please accept if answers your question or Like if helps in any way.

     

    Thanks,

    Drew

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard