UI Policy : Getting Display Value

jeremyeperdue
Giga Expert

How can I getDisplayValue on a field while I am working in a UI Policy?

When certain criteria is met with what the user selects, I want to populate the short description with the value of the choice list. I can get the sys_id of course, what is the easiest way for me to get the display value of said field?

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Jeremy,



You can get the display value of the reference field with the below piece of code.


var caller = g_form.getDisplayBox('caller_id').value; //Replace caller_id with the exact field column name as per your requirement.


View solution in original post

7 REPLIES 7

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Jeremy,



You can get the display value of the reference field with the below piece of code.


var caller = g_form.getDisplayBox('caller_id').value; //Replace caller_id with the exact field column name as per your requirement.


Thank you !!!!!!!!


Sooo...is this an undocumented, thus, unsupported method?   I don't see a reference to getDisplayBox on the g_form wiki.


I don't see a LOT of documentation on the wiki 😕


I needed to re-size a glideDialogForm the other day and had to find a one off post like this to find the answer. The wiki needs serious help. js



Regards,


Jeremy