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 / Configuring 2 related ...
Power Pages
Suggested Answer

Configuring 2 related form in same page

(1) ShareShare
ReportReport
Posted on by 893 Moderator

Hi there,

I'm new to Power Pages and I'm trying to create a page with two forms that are related.

The first form gets its ID from the previous page by an action. This first form has a column that points to a different table, so I'm creating a new form below to display the information from the related table, but I can't figure out how to make the second form reference my column value, not the ID I'm getting from the previous tab. Any ideas?

For reference, I have the following database setup:

I have a Pages table where some users create a page, but that page needs to be approved by someone. It could be more than one person, so in the Model-Driven app, I created a new table to store the approvals, named, for example, Page_Approval, and I have a column named Page_Approval that points to the table.

So my need is to have a Power Page to display the list of Page_Approval records so my user can just click on the action and be forwarded to the details of the Page_Approval, and below that, they will find a related form with the page information using the lookup column.

I'm not doing it with a lookup form because that page information contains a component that cannot be displayed that way.

Any ideas?

Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    1,300 on at
    Power Pages forms do not share context automatically
     
    Lookup fields are NOT auto-resolved between forms
     
    Correct solution = manually pass lookup record ID (via Liquid or URL)
    • Use Liquid to Resolve Lookup and Bind Second Form
    or 
    • If you prefer no Liquid:
      • Pass both IDs in URL:
      • /details?id=PageApprovalId&pageid=PageId
  • Suggested answer
    rezarizvii Profile Picture
    333 on at
    Hi, hope you are doing well.
     
    Power Pages forms don’t automatically “chain” context between forms on the same page. You always have to:
    • Pass via query string, or
    • Handle via JavaScript/Liquid
     
    The easiest approach would be to pass multiple parameters in the URL as query string and using JS on each form to only extract the relevant parameter.

    You can pass multiple query params like:

    ?pageApprovalId=xxx&pageId=yyy
    Then on each form, just read what you need from the query parameters.
     
    To add custom JS to forms which will trigger the moment the form is rendered, follow these steps:
    1. Navigate to Power Pages Management app by clicking on the (...) in your studio's sidebar and clicking on Power Pages Management app.
    2. In the model-driven app that opens, navigate to "Basic Forms" under Content from the sidebar, and find the form that you want to add JS to and open that record.
    3. Go to "Additional Settings" tab and scroll down to the bottom of that tab to find "Custom JS".
    4. Here you can add the code to extract the relevant query parameter from the URL when the form renders.
     
    Here is an example of how you can extract the parameter from the URL on the forms:

    Form 1 (Page_Approval):

    const approvalId = new URLSearchParams(window.location.search).get('pageApprovalId');
    if (approvalId) {
        // bind or use as needed
    }

    Form 2 (Pages):

    const pageId = new URLSearchParams(window.location.search).get('pageId');
    if (pageId) {
        // redirect or bind form
    }
     
    You can have AI assist you with JS on exactly what you intend to do with the parameters.
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 71

#2
DP_Prabh Profile Picture

DP_Prabh 36

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 32 Most Valuable Professional

Last 30 days Overall leaderboard