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 / Portal Entity List Col...
Power Pages
Answered

Portal Entity List Columns from multiple tables not directly related

(0) ShareShare
ReportReport
Posted on by 68

Hi,

 

I am using power portal for showing the work orders from D365 SAAS in an entity list. I want to fetch few columns from multiple tables that needed multiple joins to another tables which is not possible to add in the view associated with the entity list. I am ready to use liquid template. But how to fetch data which can be achieved only through sql queries and display in the portal. Please help.

 

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    Christian Leverenz Profile Picture
    1,214 on at

    Hi @alwaysjai ,

     

    funny, i am working on a similar problems, shall also display work orders. Small world obviously 🙂

     

    For liquid, there is a fetch available. You could do something like 

    {% fetchxml dataCheck_query %}
    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" no-lock="true">
      <entity name="contact">
        <attribute name="fullname" />
        <attribute name="adddress1_line1" />
        <attribute name="adddress1_city" />
        <attribute name="createdon" />
        <filter>
            <condition attribute="statecode" operator="eq" value="0" />
        </filter>
        <order attribute="fullname" descending="false" />
      </entity>
    </fetch>
    {% endfetchxml %}
    this fetches contacts, but you get the story. Various entities could be related via the <link-entity> tag.
    then you have to loop over the results:
    <table> {% for entityVariable in dataCheck_query.results.entities %}
    <tr>
    <td>Attribut-1: {{ entityVariable.fullname }}</td> <td>Attribut-2: {{ entityVariable.adddress1_line1 }}</td>
    </tr>
    {% endfor %}
    </table>
    For simple values, you can directly use the values. For lookups you receive an object with Name, Id and LogicalName, for optionsetentries you receive Label and Value.
    You can also access attributes from linked entities, but i always struggle with that. Have no example at hand. its something like entityVariable[<alias>].<attributenameintable>  . But i am not sure, would have to check.
     
    You can also set up the fetchxml with variables, so 
    {% fetchxml dataCheck_query %}
    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true" no-lock="true">
      <entity name="contact">
        <attribute name="fullname" />
        <attribute name="adddress1_line1" />
        <attribute name="adddress1_city" />
        <attribute name="createdon" />
        <filter>
            <condition attribute="statecode" operator="eq" value="0" />
            <condition attribute="contactid" operator="eq" value="{{ request.params.id }}" />
     
        </filter>
        <order attribute="fullname" descending="false" />
      </entity>
    </fetch>
    {% endfetchxml %}
    works perfectly.
     
    Does this already help a little bit?
     
    Have fun,
      Christian
  • Jayakumar Profile Picture
    68 on at

    Thank you very much Christian. I will try out your solution. 

  • Verified answer
    Summer Garg Profile Picture
    48 on at

    We can also create our custom table to show the data.

    There are 2 steps in this process

    Step 1 - Fetch the data from the dataverse (we can use Fetch XML/ Odata feed/ PowerAutomate)

    Step 2 - Bind this data using jQuery DataTable.

     

    For more info, please check this article.

     

    https://crmhub.blogspot.com/2018/08/Jquery-DataTable-in-D365-Portal-Adx-Studio-Portal.html

     

     

    Regards,

    CRM HUB

  • Jayakumar Profile Picture
    68 on at

    I have successfully used fetch xml and liquid templates to show the data in html table. Now I am struggling to implement sorting, search functions and row action buttons similar to the oob entity list. Any references?

     

    Thanks.

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 61

#2
Valantis Profile Picture

Valantis 46

#2
11manish Profile Picture

11manish 46

Last 30 days Overall leaderboard