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 / 2nd level link-entity
Power Pages
Answered

2nd level link-entity

(0) ShareShare
ReportReport
Posted on by 214

Hello community,


in a webtemplate a query like this:

 

 

{% fetchxml fetchquery %}
<fetch mapping="logical" version="1.0" distinct="true" output-format="xml-platform">
 <entity name="entity01">
 <all-attributes />
 <filter type="and">
 <condition attribute="createdon" operator="today" />
 </filter>
 // 1st level
 <link-entity name="entity02">
 <all-attributes />
 // 2nd level
 <link-entity name="entityA" alias="fa">
 <attribute name="name" />
 </link-entity>
 </link-entity>
 </entity>
</fetch>
{% endfetchxml %}

 

It works fine and XRMtools FetchXMLTester outputs all data.

How to output attribute from link-entity EntityA in webtemplate?

 

{% for record in fetchquery.result.entities %}
 entity01: {{ record.attribut1 }}
 entity02: {{ record['entity02.attribut21']}}
 entityA: {{ record[ ??? ] }}
{% endfor %}

 

Looks nice, but didnt work:

 

{{ record['entity02[entityA.name]'] }}

 

Same with:

 

{{ record['entity02["entityA.name"]'] }}

 


It ends with:
Liquid error: Value cannot be null. Parameter name: key


Any help?


One solution could be, to use an additional query to entityA to request the value.
A solution but not nice.

 

Thanks,
AndKan.

 

Categories:
  • Verified answer
    OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    Hi @AndKanPA ,

    I had this problem before when tried to get the data and the answer was surprisingly simple. Just use an alias of the second level entity and get it if it was the first level:

    {{ record['fa.name'] }}
  • AndKanPA Profile Picture
    214 on at

    Hi @OOlashyn ,

    an alias as solution. Sounds really simple ...

     

    Thank you.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
M Bilal Khan Profile Picture

M Bilal Khan 99

#2
Mohsin Ali Profile Picture

Mohsin Ali 37

#3
11manish Profile Picture

11manish 21 Super User 2026 Season 2

Last 30 days Overall leaderboard