Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
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.

  • Jayakumar Profile Picture
    68 on at
    Re: Portal Entity List Columns from multiple tables not directly related

    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.

  • Verified answer
    Summer Garg Profile Picture
    48 on at
    Re: Portal Entity List Columns from multiple tables not directly related

    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
    Re: Portal Entity List Columns from multiple tables not directly related

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

  • Verified answer
    Christian Leverenz Profile Picture
    1,214 on at
    Re: Portal Entity List Columns from multiple tables not directly related

    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

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35