PowerApps portal list view related data to selected record

642 Views Asked by At

The situation is that I have a Form filled with data from a Table. I want to be able to view related data from a related Table when a record in the Form is selected. As shown in the screenshot below, when clicking on the link in the column I want a pop-up shown with related data to that specific record from a certain table. I am trying to use View details from the Form that is on the page. How do I query the related data and display it?

enter image description here

1

There are 1 best solutions below

0
On

The way I approached this issue is by utilizing jQuery and the Dataverse API. Unfortunately, I do not hold access to the code that I wrote. But I will give a description of how I approached the issue from memory.

  1. Not something I liked doing because the rendered code by Microsoft could change. After an item from the table would be clicked, a pop-up would show and then I would use jQuery to select where I would want to add additional elements in that pop-up. I think I needed to use some special methods to accomplish this, because you need "wait" until the pop-up shows and fully builds its elements or something like that.
  2. Then I would use the Dataverse API to fetch the necessary information. When the pop-up shows, somewhere in the DOM you can find the respective ID of the selected record from the table by using jQuery again. With the ID you can send a query to Dataverse with the item ID and fetch whatever data you need.
  3. After fetching from Dataverse, I just processed the data on the client side into building a table and inserting it into the pop-up.

I remember having this work like a charm. Biggest issue was figuring out the Dataverse API, because they do not have the clearest documentation and not a big user base so it is harder to find help.