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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to get enum in using resultset

(0) ShareShare
ReportReport
Posted on by 1,295

Hi,

I would like to ask for help on how to get enum using resultset method. Hoping for your prompt response. Thank you.

Sincerely,

Ivan

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,284 on at

    Hi Ivan Siason,

    Enums are stored in DB as integer.

    So if you have NoYes::Yes in your table resultset will return you 1 for example.

  • SII1MNL Profile Picture
    1,295 on at

    in the resultset can use display method?

  • Mea_ Profile Picture
    60,284 on at

    why do you want to use display method ?

  • SII1MNL Profile Picture
    1,295 on at

    will it get the result of the name of the enum based from value?

  • Sohaib Cheema Profile Picture
    49,443 User Group Leader on at

    seems you are using  ODBC to read data from some external source and you might be looking to convert int value to enum.

    Am I correct?

  • Mea_ Profile Picture
    60,284 on at

    Can you elaborate your question, what do you want to get and where ?

    If you have a field on your table e.g. MyTable.MyField you can either do

    MyTable.MyField = NoYes::Yes or

    MyTable.MyField = 1

    result would be the same because enums are integers behind the scene.

    So you can declare a variable NoYes noyes = 1;

    and when you will do info(strfmt("%1", noyes); AX will show "Yes".

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans