Display the value of an Option field

Hi everyone,

How can I display the value of an Option field???

For example, the code Employee.PaymentMode returns 1, but I want it to display the corresponding OptionString…

How to do that???

Did you set OptionCaption for the field in table?

Hi Poppins,

It depends on which context you want it to return the value in. Is it to a report or form/page? Or?

Sometimes if you work with the option field values in code then it behaves differently from when you just display the field “normally” in a report or form.

Infact, I need to display it in an Excel file (I am exporting data to Excel)…

Hi,

Have you tried using the FORMAT function?

FORMAT*(record**.option_field*);

Best regards.

Thanks a lot [:)]