alert(g_form.getValue('assignment_group'));

Sarah Bouil
Tera Expert

alert(g_form.getValue('assignment_group'));

 

I am getting sys_id but I need a display value of it. For example the Assignment Group value is 'CAB Approval' it should be display a CAB Approval it should not be a sys_id of 'CAB Approval'

4 REPLIES 4

AnveshKumar M
Tera Sage
Tera Sage

Hi @Sarah Bouil ,

 Try the getDisplayBox with value property. For example,

 

var group = g_form.getDisplayBox('assignment_group').value;

 

Thanks,

Anvesh

 

Thanks,
Anvesh

Hi Anvesh,

Try using g_form.getDisplayBox('assignment_group').value); which gives you display value 

 

 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

Ankur Bawiskar
Tera Patron
Tera Patron

@Sarah Bouil 

This is for normal form or catalog form?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Uday_Kumar
Giga Guru

Hi @Sarah Bouil Paste this script in your client script you will get alert of the display value.

 

alert(g_form.getDisplayBox('assignment_group').value);

 

Output:

Uday_Kumar_0-1680683471635.png

If my solution helps you please mark my Solution Accepted and Helpful.

Thanks and regards

Uday Kumar Valapudasu