How to Get the DisplayValue of a select box variable in “Client Side” on RITM.

Tejashri2
Tera Contributor

Hello Guy's 

 

 

On the RITM i am trying to show the diplay value for "select Box" type variable but unable show that with below methods:

getDisplayValue()

g_form.getDisplayBox(‘field_name’).value

 

 

Thanks in Advance!

3 REPLIES 3

Siva Jyothi M
Mega Sage

Hi @Tejashri2,

 

Can you please elaborate with screenshots.

Hemanth M1
Giga Sage
Giga Sage

Hi @Tejashri2 ,

 

try this 

var backendValue=g_form.getValue('selectboxname');  //get the value
var displayValue=g_form.getOption('selectboxname', backendValue).text; //get you the display value
Accept and hit Helpful if it helps.

Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025

Anurag Tripathi
Mega Patron
Mega Patron

Try this

var myVal=g_form.getValue('for_community');  //get the value
alert(myVal);

 

AnuragTripathi_0-1694713542236.png

 

-Anurag