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 / How to view related re...
Power Pages
Unanswered

How to view related records based on ID

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have this scenario:

Table 1:

Immagine 2022-09-28 190549.png

 

Table 2:

Immagine 2022-09-28 190615.png

 

 

 

Id_match is a correlated columns between the two tables.

 

I'll display in view (Power Portal/Pages List) the entire first table in webpage n.1.

 

Next to the single record in my view I'll put some options for detail or edit the record:Immagine 2022-09-28 191126.png

 

When I click on edit I'd like to see only the related records in a different view in webpage n.2.

 

Should I use Liquid object or FetchXML? Should I use the GUID instead? Should I use an Entity form instead of a View/List?

 

The equivalent query should be:

SELECT Player from Table2 WHERE Id_match = (the one I click on Table 1)

 

Thanks in advance,

I'll provide more details on request.

Categories:
I have the same question (0)
  • eugenevanstaden Profile Picture
    441 on at

    @Anonymous 

    The edit action from the List will link to the actual record. Is your scenario the following:

    Instead of Edit navigating to the record you want to navigate to a related record, or to a record that is a lookup on your main record?

    You can add some JavaScript to the form or list itself and basically add a link to your form with the related record.


    If you inspect the grid elements you will see lookup columns contain the entity + id in a json value and you can use something like below to manipulate the grid.

    {%assign details = sitemarkers["PageWhereYourFormIs"]%}
    
     $("#your_subgrid").on("loaded", function () {
     addLinks($(this).find(".entity-grid.subgrid"));
     });
    
    
    function addLinks(element){
     $(element).children(".view-grid").find("td[data-attribute='new_yourlookupfield']").each(function (i, e){
     var data = JSON.parse(e.dataset.value);
     var link = "{{details.url}}?detailid=" + data.Id;
     $(this).html("<a href='"+link+"'>View Results</a>");
     });
    }




  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Actually I want to display on a view just the players who partecipate to the match so I'll need the Id_match chosen from Table 1 to filter and show players with the same Id_match in Table 2.

  • eugenevanstaden Profile Picture
    441 on at

    @Anonymous 

    can you add the picklist filter on the List - and then use Javascript to select the id and trigger the filter button, similar to this article

    https://ulrikke.akerbak.com/2022/03/15/filter-power-portal-list-with-url-parameter/

     

     

     



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 64

#2
DP_Prabh Profile Picture

DP_Prabh 34

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 30 Most Valuable Professional

Last 30 days Overall leaderboard