How do you get the Choice Value from a Choice field? (not a trick question!)

Not applicable

Assume a GlideRecord, 'gr', with choice field 'os' (operating system).

How do I get the value?

gr.os.getChoiceValue() returns the 'choice label'
gr.os.getDisplayValue() returns the 'choice label'
gr.os.getElementValue() returns the 'choice label'
gr.os.getLabel() returns the 'field name'
gr.os.getValue() returns undefined

My understanding of Choice lists was that the 'label' was the human readable name and is more prone to changing to meet user tastes in spelling, wording, whatever.

And that 'value' was the ID of the choice being made and is NOT meant to be human readable.

Thanks,
Afshin

5 REPLIES 5

Not applicable

SOLVED, thank you!