Skip to main content

Notifications

Community site session details

Community site session details

Session Id : PI5JJEsJ5K2lFx87VM4NFi
Power Pages - General Discussions
Suggested answer

[Liquid] How to get all fields of a entity ?

Like (1) ShareShare
ReportReport
Posted on 24 Sep 2024 10:00:34 by 38
Hello
 
I use fetchxml to get a list of a entity.
there are 40 fields in the entity.
and I just want to print the filed name and value.
 
I don't want to print one by one.
so I want to use a for  to print all.
 
the code in below don't working.   
The question is how can I get the all fields of the entity?
 
{% for item in fetchResult.results.entities %}
 
  {% for field in item %}
    {{ field .name }}
  {% endfor %}
 
{% endfor %}
Categories:
  • Suggested answer
    Fubar Profile Picture
    7,867 Super User 2025 Season 1 on 24 Sep 2024 at 23:07:16
    [Liquid] How to get all fields of a entity ?
    Not sure that what you are wanting to do is possible or not.  Some things you could try:
    • dump your 'field' object out to JSON or XML to see if it exposes anything e.g. {{ field | json }}
    • check the ExtensionData property of the results (note: results object not the results.entities object) to see if it contains anything you can use (I'm not sure what its case will be e.g. in the link below you will see Entities listed as capital, but is actually lower case in the liquid https://learn.microsoft.com/en-us/power-pages/configure/liquid/template-tags#results-attribute

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Pages - General Discussions

#1
WarrenBelz Profile Picture

WarrenBelz 9 Most Valuable Professional

#2
Rondel Profile Picture

Rondel 6

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 4 Most Valuable Professional

Overall leaderboard
Loading started