web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : cDBgotbvnrAzHW8JXW6HYi
Power Pages - General Discussions
Answered

Fetchxml doesnt return any data

Like (0) ShareShare
ReportReport
Posted on 14 Mar 2023 15:34:34 by 125

Hi All

I am just starting looking in to using liquid in power pages and building first fetchxml query but its not returning any data

 

{% fetchxml a_test %}
<fetch version="1.0" mapping="logical" > 
 <entity name="rim_testList1"> 
 <attribute name="Name"/> 
 </entity> 
</fetch> 
{% endfetchxml %}
{% assign aa_test = a_test.results.entities %}
{{ aa_test.size }}

And aa_test.size is always 0    😞 
Its not permissions issue as I created another page with adding that list and it is showing results

Any idea where I am going wrong?

Also can anybody explain the difference between using fetchxml and entities.account[id]?

Thanks

Categories:
I have the same question (0)
  • romankorchak2 Profile Picture
    125 on 16 Mar 2023 at 18:06:51
    Re: Fetchxml doesnt return any data

    Thanks a lot, that works now 😀

     

  • H V Profile Picture
    1,510 on 16 Mar 2023 at 06:40:22
    Re: Fetchxml doesnt return any data

    Hi @romankorchak2 

     

    Please follow the steps which is provided by @Fubar 

    {% fetchxml a_test %}
    <fetch> 
     <entity name="rim_testlist1"> 
     <attribute name="rim_name"/> 
     </entity> 
    </fetch> 
    {% endfetchxml %}
    
    {% assign aa_test = a_test.results.entities %}
    {{ aa_test.size }}

     

     

    --------------------------
    If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!

     

     

  • Verified answer
    Fubar Profile Picture
    8,060 Super User 2025 Season 2 on 14 Mar 2023 at 22:20:44
    Re: Fetchxml doesnt return any data

    as a start your fetchxml query is incorrect. 

    • Your entity name needs to the the logical schema name of the table (will be all lowercase)
    • You do not have Column "Name" - on a custom table (as indicated by the prefix on the table name) your columns will be prefixed with your publisher prefix (base standard out of the box Tables and Columns are the only ones that do not have a prefix), and it will also be the logical schema name of the Column, and it will be all lowercase e.g. rim_name

    For simple queries the easiest ways to create the fetchxml is to create a Model Driven App and either use Advanced Find or change the criteria on a view and then export the fetchxml (a button in the query builder).

     

    More advanced queries download XrmToolBox (xrmtoolbox.com) and use its the fetchXML Builder tool.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#2
Lucas001 Profile Picture

Lucas001 48 Super User 2025 Season 2

#3
KevinGador Profile Picture

KevinGador 44 Super User 2025 Season 2

Loading complete