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

Hi,

If you are running this script on tables please use the script as Anurag suggested.

 

Thanks,

Murthy

Thanks,
Murthy

I thought you are working on the catalogs/record producers.

Thanks,
Murthy

On the ritm, you can read the variable using the same script I gave. 
Im not sure what you gave will work on RITM or not, I think it will just print the RITM number(or tickets display number).

-Anurag

Hi Anurag,

Thanks for the reply.

I thought he is asking about the display value of the reference field in the catalog form

that's why I gave g_form.getDisplayValue('variable_name');

but yes this wont work for tables.

 

Thanks,

Murthy

Thanks,
Murthy

Yup, Cheers!!

-Anurag