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 Pages / Power pages - displayi...
Power Pages
Answered

Power pages - displaying main table and related tables in details page.

(2) ShareShare
ReportReport
Posted on by 8
Hi everyone,

I’m building a details page for an “Approval hub” record and want to show:
- Fields from the parent “Purchase header” (N:1 from Approval hub)
- A list of related “Comments” (N:1 to Approval hub) — this already works as a subgrid
 
From my “Approval hub” table list, I open a details page (the list passes the Approval hub ID in the query string as `id`).
On the details page, I can render the Approval hub form and the Comments subgrid. 
However, I cannot make a second form for “Purchase header” automatically bind to the correct parent record without prompting the user to select the lookup.
Quick view does not work my case, and the Form component control just lets me do this through lookup.
 
**Desired behavior:** The Approval hub details page should load the “Purchase header” fields , with the user not having to select anything.
 
Can this only be done with fetchxml and Liquid? 
 
**Tables/Relationships:**
- Purchase header 1 — N Approval hub
- Purchase header 1 — N Purchase line
- Approval hub 1 — N Comment
 
 
 
 
Many thanks ! 
Categories:
I have the same question (0)
  • Suggested answer
    Jerald Felix Profile Picture
    358 Super User 2026 Season 1 on at
     
    Thanks for your question about displaying a main table record and its related tables on a details page in Power Platform (likely Power Apps canvas app with Dataverse or SharePoint). This is a common scenario for parent-child relationships, where you show the parent (main) record details and a list of child (related) records in a gallery or modern table control. I'll outline the steps to achieve this using lookups or relationships.
     
    Prerequisites
    • Ensure your tables have relationships set up: In Dataverse, create a lookup column in the child table pointing to the main table's primary key (e.g., ID). For SharePoint, use lookup or choice columns for linking.
    • Use a detail screen (or form) for the main record and add a gallery/modern table for related records.
    Steps to Display Main and Related Tables
    • Set Up the Main Record Display:
      • On your detail screen, add an Edit form or labels/controls to show the main record.
      • Use the OnSelect of the main gallery (from a previous screen) to navigate and pass the record: Navigate(DetailScreen, ScreenTransition.Cover, {SelectedItem: Gallery1.Selected}).
      • For the form's Item property: LookUp(YourMainTable, ID = SelectedItem.ID) or SelectedItem if passing the variable.
    • Add and Filter Related Records:
      • Insert a gallery or modern table control below the main record form.
      • For the control's Items property, filter the related table by the main record's ID:  Filter(YourChildTable, ParentLookup.ID = SelectedItem.ID)
      • Replace ParentLookup with your lookup column name (e.g., 'MainRecord').
      • For more columns from the main table, use AddColumns to join:
    AddColumns(
      Filter(YourChildTable, ParentLookup.ID = SelectedItem.ID),
      "MainName", LookUp(YourMainTable, ID = ParentLookup.ID, Name)
    • This shows child records with optional parent details.
    Configure the Related Control:
    • In the gallery items (labels), bind to child fields: e.g., ThisItem.ChildName.
    • For modern table (responsive), set Items as above, choose fields via the properties pane, and enable search/sort: Add a search box with Search(YourFilteredCollection, TextInput1.Text, "ChildName").
    • Handle empty states: Use If(IsEmpty(Gallery1.AllItems), "No related records", ...) in a label.
    • Handle Edits/Saves:
    • For new related records, add a form below the gallery with Item as a new record and default the lookup: Default(ParentLookup, {Value: SelectedItem.ID}).
    • On submit: SubmitForm(RelatedForm); Refresh(YourChildTable) to update the gallery.
    Example for Dataverse
    If using Dataverse, relationships are automatic via lookups:
    • Main gallery Items: YourMainTable
    • Detail screen variable: Set(varMainRecord, Gallery1.Selected)
    • Related gallery Items: Filter(YourChildTable, MainRecord eq varMainRecord.'MainTable(Id')
    Test in preview mode—ensure delegation if large datasets (use collections if needed: ClearCollect(colRelated, Filter(...))). For complex joins, consider Power Automate for data prep.
     
    Best Regards,
    Jerald Felix
  • SÞ-03101021-0 Profile Picture
    8 on at
    Just to clarify, I’m working in Power Pages, not Power Apps (Canvas). I’m building a details page using Dataverse forms and subgrids, and I’m hoping to show fields from a related parent record (Purchase header) automatically — without requiring the user to select the lookup manually. I’d prefer to avoid using Liquid or FetchXML if possible, and I’m curious if there’s a way to achieve this using out-of-the-box components or client-side logic. Appreciate any suggestions!
  • Verified answer
    Fubar Profile Picture
    8,487 Super User 2026 Season 1 on at
    Generally you would use a Quick View form for this - you don't provide details of why you are not able to in this case.
     
    You could also, show the details from the parent using HTML and use Liquid fetchxml to retrieve the values. (placing before the child form), or create a page for the parent and then load that page as an Iframe (but you will also need to set appropriate height etc for the frame).
     
    Shows a bit more of how to use fetchxml (but can ignore the manifest part if not building a component) https://learn.microsoft.com/en-us/power-pages/configure/web-templates-as-components-how-to#create-web-template-with-manifest
     
     
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 56

#2
Valantis Profile Picture

Valantis 46

#3
rezarizvii Profile Picture

rezarizvii 35

Last 30 days Overall leaderboard