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 / fetchxml permissions
Power Pages
Answered

fetchxml permissions

(0) ShareShare
ReportReport
Posted on by 217
All,
 
Having difficulty getting liquid to render on a page.  After much work/research/attempts. it must be a permissions issue.
 
I've set the table permissions for both anonymous = Read and Auth/Admin = Full
 
 
 
Here is a test example.  This code is in a web template called "accountFetch-web-template";
 
***************************
{% fetchxml accounts %}
<fetch top="5">
  <entity name="account">
    <attribute name="name" />
    <attribute name="accountid" />
  </entity>
</fetch>
{% endfetchxml %}
 
<p>Number of records returned: {{ accounts.results.size }}</p>
***************************
 
It is called from a web page with {% include 'accountFetch-web-template' %}
 
But nothing is displayed.
 
Any ideas on how to get liquid to show would be greatly appreciated.
 
Doug
 

 
 
 
Categories:
I have the same question (0)
  • Verified answer
    oliver.rodrigues Profile Picture
    9,471 Most Valuable Professional on at
    Hi
     
    when you say nothing is rendered, is the page fully blank or do you see something like:
    "Number of records returned: " (with no count showing)
     
    did you try to render the results of or fetch?, for example
    <table>
    {% for entityVariable in accounts.results.entities %}
    <tr>
    <td>Attribut-1: {{ entityVariable.name }}</td>
    <td>Attribut-2: {{ entityVariable.accountid }}</td>
    </tr>
    {% endfor %}
    </table>
     
  • Verified answer
    dgray304 Profile Picture
    217 on at
    Oliver,
     
    The latter.  The label rendered, but no value from liquid.
     
    This line was the problem:  <p>Number of records returned: {{ accounts.results.size }}</p>  The liquid was bad and it broke the rest.
     
    I pasted your TABLE iterate code in and found it worked.  ONLY after removing the trouble line (above).

    I was using "accounts.results.size".  I needed to use "accounts.results.entities".
     
    Taking the offending code out, allowed the loop to render.
     
    NOTE: Only way to get the count was to initialize a var to zero, then increment during the loop.

    Thanks, your response helped me get to a resolution.
     
    Doug 

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