Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
Answered

View from multiple levels of entities

(0) ShareShare
ReportReport
Posted on by 214

Hello,
I have to collect data over more then one relationship.
Please look at this image:

AndKanPA_0-1599722635092.png

Entity01 has 1:n relationship to Entity02, and Entity02 again 1:n to Entity03

In my view of Entity01 I need value03 from Entity03.

value02 is no problem to insert in view.
But I dont see any option in view editor to get info from next relationship level.

Of course I can use fetchXML in WebTemplate ... but it's more complicated 😉

 

Thanks for help

AndKan.

  • AndKanPA Profile Picture
    214 on at
    Re: View from multiple levels of entities

    Seems, that related database constructions from dynamics.
    This is only a problem, if you (have to) migrate from them into dynamics.

     

    My solution (for all who has migrate too 😉 was: Reduce relationship chains.

    Two ways for me to reconstruct:
    1) merge some data in a SQL-view and import this view into CDS.
    2) create shorter tables into option sets instead of entity   

     

    Thanks,

    AndKan

  • justinburch Profile Picture
    Microsoft Employee on at
    Re: View from multiple levels of entities

    No worries,

    I usually build with Portals for Dynamics implementations, so this is news to me but does make sense. In Dynamics, we think of the records based on their primary name, but this would be less important from a CDS/DB perspective - we would more so care about their primary key. Thanks for sharing that, now I'll know to include it in future responses.

    Speaking of, if you feel I've helped resolve the issue, please consider marking the response so that it can be helpful to link for future duplicate questions.

  • AndKanPA Profile Picture
    214 on at
    Re: View from multiple levels of entities

    Thank you very much for very very good explain and example.

    Works as described 🙂

    It's a funny thing, that in "entity data" only GUID of entity03 records:

    AndKanPA_0-1599912832301.png

    But on portal the right data (attribute name) as you described:

    AndKanPA_1-1599912885524.png

    AndKanPA_3-1599913009630.png


    Ty Justin.

     

    Best regards,

    AndKan.

     

     

  • Verified answer
    justinburch Profile Picture
    Microsoft Employee on at
    Re: View from multiple levels of entities

    Hi @AndKanPA,

    This helps some of the confusion - your original statement of "Entity01 has 1:n relationship to Entity02, and Entity02 again 1:n to Entity03" should be "Entity1 has a N:1 relationship to Entity2, Entity2 has a N:1 relationship to Entity3" - 1:N indicates 1 computer has many (N) vendors.

    You are typically able to reference a related record's data via a Quick View form, but you won't be able to use a Quick View inside of a Quick View. If what you gave as an example is the sole requirement, it's an easy solve:

    My Setup:

    • Entity A (Entity01) has a Lookup to Entity B (Entity02) named "Entity B Ref"
    • Entity B (Entity02) has a Lookup to Entity C (Entity03) named "Entity C Ref"
    • A Quick View Form, named "Entity C Data", is created for Entity B (Entity02) includes the Lookup to Entity C (Entity03)
    • The Portal Form includes the Quick View Form mentioned in the above step
    • A View was created to show Entity A (Entity01) data with the following columns: Name, Entity B Ref, Entity C Ref (via Entity B Ref relationship)

    Create a Quick View Form (Forms) on your Entity2

    justinburch_0-1599851092039.png

    Include the Lookup field of Entity3 in the Quick View Form
    Add the Quick View Form to the Portal Form of Entity1

    justinburch_1-1599851107167.png

    Voila

    justinburch_2-1599851119993.png

    Additionally, a view of all 3 being used in lists of Entity1 records

    justinburch_3-1599851134574.png

    If you need to show data that is not the record name of Entity 3, we will have to consider custom approaches.

    I hope this helps,

    Justin

  • AndKanPA Profile Picture
    214 on at
    Re: View from multiple levels of entities

    Hello Justin,

     

    a subgrid is not a resolution, because i need only one value from entity03, which is related on entity02 and from there to entity01.
    Better example:
    There is an entity01 with computers
    Every computer has a vendor from entity02.
    Every vendor has a contact in entity03.

    AndKanPA_0-1599833896675.png

    In a view/list of computers I want to show vendors contact phone from entity03.

     

    But I'm afraid, you are right and I need a custom liquid. And build als sort and filter options by hand? 😒

     

    Thank you,

    AndKan.

  • justinburch Profile Picture
    Microsoft Employee on at
    Re: View from multiple levels of entities

    Hi @AndKanPA,

    So you need a list of value03, which you would not be able to do directly from Entity 01. If Entity1 had a 1:N to Entity 2 and Entity 2 had a N:1 to Entity3, you could do this with a subgrid of Entity 2 while Entity 2's Entity 3 related record is in the view.

    You'll have to use custom Liquid or a subgrid of Entity2 records that open a modal Entity Form with a subgrid of Entity3 records.

     

    I hope this helps,

    Justin

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

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!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35