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 / Liquid didnt output va...
Power Pages
Answered

Liquid didnt output values

(0) ShareShare
ReportReport
Posted on by 214

Hello community,

 

I have 3 tables.
Table 1 computers:
- Name (string)
- companyid (lookup 1:M table2)

- employeeid (lookup 1:M table3)

 

Table 2 companies: 

- Name (string)

 

Table 3 employees:

- Name (string)

 

FetchXML is:

 

<fetch top="50" distinct="true" >
 <entity name="cr847_table1" >
 <attribute name="cr847_company" />
 <attribute name="cr847_employe" />
 <filter>
 <condition attribute="cr847_tableid" operator="eq" value="640b201a-f939-eb11-a813-0022480691de" />
 </filter>
 </entity>
</fetch>

 

 

Result in FetchXML Builder are columns with GUID values like expected:

Idcr847_companycr847_employe
640b201a-f939-eb11-a813-0022480691de2c82dfe8-1fff-ea11-a815-000d3a98de0fa690e432-8efd-ea11-a815-000d3a1021f8

 

Same FetchXML in FetchXML-Tester returns response:

 

<resultset morerecords="0">
 <result>
 <cr847_company name="Highfive" type="10902">{914557BB-0EFF-EA11-A815-000D3A98DE0F}</cr847_company>
 <cr847_employe name="hero1" type="10903">{6BB332ED-1FFF-EA11-A815-000D3A1021F8}</cr847_employe>
 </result>
</resultset>

 

 

Fine so far.
When I try to output this result in a webtemplate with Liquid:

 

 

{% fetchxml table1_query %}
 # fetchxml from above
{% endfetch %}

{% for result in table1_query.results.entities %}
 {{ result.cr847_company }}
 {{ result.cr847_employe}}
{% endfor %}

 

 

nothing comes out.

Where is my mistake?


I think, everytime when FetchXML-Tester shows an additonal attribute like name or type in this example, I cannot use result.<attributname> for output.

 

Thanks for help,

AndKan.

 

Categories:
  • Satya Ranjan Kar Profile Picture
    8 on at

    Hi @AndKanPA , 

    If your web page is enabled for entity permission, make sure the entity permission for the 'cr847_table1' is created. Follow the link below to add record based permission for the Portal. 

    https://docs.microsoft.com/en-us/powerapps/maker/portals/configure/assign-entity-permissions 

    Thanks,

    Satya

  • AndKanPA Profile Picture
    214 on at

    Hello @satyarkar,

    thank you, but it is sure not a problem of permissions.
    I receive results of other attributes. And all results are in XRMtools available.

  • Satya Ranjan Kar Profile Picture
    8 on at

    Hi @AndKanPA,

    The record based security is different for Portal and XrmTools. If Portal web page is enabled for entity permission, you have to create Portal entity permission for all the tables (computers, companies and employees)  referenced in your fetchXml for Liquid to get result from Dataverse.  Next you have to associate the entity permission to the User's Web Role.  If still you have issue, it would be good to see your compete liquid script and entity permissions configuration. 

    Thanks,

    Satya

     

  • AndKanPA Profile Picture
    214 on at

    Hello @satyarkar

    {{ table1-query.results.size }} returns 1 as expected.
    With missing permissions it would return -1 (no records/ no result)

     

    Thanks,

    AndKan.

  • Verified answer
    AndKanPA Profile Picture
    214 on at

    {{ result.cr847_company['name'] }} and {{ result.cr847_company.name }} output "Highfive"
    With {{ result.cr847_company['type'] }} I expected 10902, but outputs nothing.

    I figured out, that{{ result.cr847_company['id'] }} returns 914557BB-0EFF-EA11-A815-000D3A98DE0F for my next fetch; {{ result.cr847_company.id }} too.

     

    So my problem is solved.
    But is somewhere a complete documentation about FetchXML and Liquid in PowerApp Portals? I think FetchXML with Liquid is very powerfull, but seems not documented?

     

  • Satya Ranjan Kar Profile Picture
    8 on at

    Hi @AndKanPA,

    You can get the related table details in the same query. To get access to the entire entity, use the relationship name instead of the name of the lookup field, like so:

    {% for result in table1_query.results.entities %}
       {{ result.<relationshipname>.fieldname }}
    {% endfor %}
     
    ----------------------------------------------------
    If you find this post helpful consider marking it as a solution to help others find it.

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 139

#2
Mohsin Ali Profile Picture

Mohsin Ali 43

#3
11manish Profile Picture

11manish 21 Super User 2026 Season 2

Last 30 days Overall leaderboard