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 / Loading Label of choic...
Power Pages
Answered

Loading Label of choice columns via FetchXML

(0) ShareShare
ReportReport
Posted on by 2,567 Super User 2026 Season 1

Hi all,

 

does anybody have a short trick on how to get the values of a choice column (global or column choice).

I want to get the label of the choice assigned to the record.

My choices column me_y, me_z are column choices the me_w is a global choice. Neither is working as hoped.

 

FetchXML for now would be:

<fetch top="50">
<entity name="me_x">
<attribute name="me_y" />
<attribute name="me_z" />
<attribute name="me_w" />
<attribute />
<attribute />
</entity>
</fetch>

 

 

Outcome is the following:

Lucas001_0-1716904751008.png

 

Any suggestion is appreciated.

Categories:
I have the same question (0)
  • Verified answer
    Lucas001 Profile Picture
    2,567 Super User 2026 Season 1 on at

    Seems to be easy.

    Correct syntax is {{ item.me_y.label }}

  • GWham1 Profile Picture
    on at

    choice.label will work 😎

     

    {% for result in tickets.results.entities %}
     {{ result.name }}
     {% for choice in result.choicefield %}
     {{ choice.label }}
     {{ choice.value }}
     {% endfor %}
    {% endfor %}
  • Suggested answer
    shalinibh Profile Picture
    2 on at
    you will need to join the table with stringmap table which is a system table that stores label-value mappings for all choice/option sets.
    • attributeName is the name of your choice field.

    • objecttypecode is the logical name of the entity (e.g., account, contact).   

    Below is the sample code for account table status code column labels

    <fetch>
      <entity name="account">
        <attribute name="name" />
        <link-entity name="stringmap" from="attributevalue" to="statuscode" link-type="inner" alias="sm">
          <filter>
            <condition attribute="attributeName" operator="eq" value="statuscode" />
            <condition attribute="objecttypecode" operator="eq" value="account" />
            <condition attribute="value" operator="eq" value="Approved" />
          </filter>
        </link-entity>
      </entity>
    </fetch>

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 56

#2
Valantis Profile Picture

Valantis 28

#3
omkarsupreme Profile Picture

omkarsupreme 24

Last 30 days Overall leaderboard