Get Choice Label and not Value

Community Alums
Not applicable

Hi!

How I do I get Choice Label and not the Value. This is on Client Side

var priorityValue = g_form.getValue('priority'); 

var priorityLabel = g_form.getOption('priority', priorityValue).text;

I am doing this code and nothing!

Thanks in advance!

1 ACCEPTED SOLUTION

Ahmmed Ali
Mega Sage

There might be some better option at client side only, but the one I getting getting now is to use GlideAjax to send value to server and then return display name from server.

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

View solution in original post

5 REPLIES 5

allison_holt
Giga Expert

getDisplayValue should give you the Label and not the Value.

Community Alums
Not applicable

Sadly it doesn't work in Client Side 😞

Any other suggestion?

Can you send the script that you were trying to use?

Ahmmed Ali
Mega Sage

There might be some better option at client side only, but the one I getting getting now is to use GlideAjax to send value to server and then return display name from server.

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali