Skip to main content

Notifications

Business Central forum
Suggested answer

Retrieve Enum Caption In Query

Posted on by 5

Hi,

I currently have an enum for storing a list of a data that a user can select, that looks like this:
Enum code

I made a table extension for the Job table and a page extension for Job Card, where the user can select from this list. All of that works fine, but once I try to query the table, I just get the integer value for each of the choices. Is there a way that I can store the caption, rather than the integer in the table? If not, would it be possible to convert the integer value to the caption within my query?

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 68,242 Super User 2024 Season 2 on at
    RE: Retrieve Enum Caption In Query

    Hi, Kauffmann has discussed this in detail before.

    https://www.kauffmann.nl/2020/07/16/converting-enum-values-in-al/

    pastedimage1677021280929v1.png

    Hope this helps.

    Thanks

    ZHU

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,186 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,996 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans