Onchange and onload client script for variable editor

Arun_Manoj
Mega Sage

Hi ,

 

I need to fetch a value from variable editor variable based on that variable i need to update the assignment group onchange and onload.

g_form.getValue('variables.division');

5 REPLIES 5

OlaN
Giga Sage
Giga Sage

Hi,

Please explain your question in a bit more detail to make it understandable.

Also screenshots would help understand what you need help with.

Chaitanya ILCR
Kilo Patron

Hi @Arun_Manoj ,

 

you can check the  

Applies on Target Record check box if it's record producer generated record 

check the Applies on catalog task if it's on catalog task

check the Applies on requested item if it's on the RITM

ChaitanyaILCR_0-1754048746964.png

 

and you get the variable by g_form.getValue('your_variable_name')

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

Ankur Bawiskar
Tera Patron
Tera Patron

@Arun_Manoj 

what's your business requirement? share screenshots.

if you are writing normal client script on your table's field then this is the syntax to grab the variable value

g_form.getValue('variables.division');

If you are writing catalog client script then syntax is this

g_form.getValue('division');

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@Arun_Manoj 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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