How to get the display value of a reference variable in Script Include?

User205031
Tera Contributor

Hi All,

ga.addParam("sysparm_groupid", g_form.getValue("app_name")); is the reference variable in client side which passes the sys_id to script include of the record.

var nam = this.getParameter('sysparm_groupid'); -> I am getting the sys_id of the record in Script Include

I want to get the display value of this record to query that in a table.

I have used getDisplayValue but it is not working.

var t = nam.getDisplayValue();

Please help!

Thanks

9 REPLIES 9

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

In this case, you either have to pass the display value, or you have to query the table this record belongs to and then get its display field.

-Anurag

-Anurag

Hi Anurag,

I have to query this record in a different table so I need the display value to query it. 

How to pass the display value of that record from client script to script include?

Thanks!

Hi,

you can get the display value of a reference field or variable by the below script on client side

g_form.getDisplayBox('<field or variable name>').value

-Anurag

 

-Anurag

Murthy Ch
Giga Sage

Hi 

You can use 

g_form.getDisplayValue('variable_Name');

to get the display value of the reference field but its not recommended.

Either I would suggest glide the table and get the display value of the record.

Thanks,

Murthy

Thanks,
Murthy