Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

On change client script in reference Field

Shabbir1
Tera Contributor

Hello Team,

 

Is it possible to use on change client script on reference variable ..??

 

Requirement : If we select the country as UK in country variable (reference variable) in the category variable "autopay "option should  be hidden category is also a reference variable can anyone suggest how to achieve this without using/updating the reference qualifier is there any other solution..?

1 REPLY 1

Ankur Bawiskar
Tera Patron

@Shabbir1 

yes this is possible and you can add/remove options using OOTB g_form method

g_form.addOption(), g_form.removeOption()

reference qualifier won't work for drop down variable

what did you start with and where are you stuck?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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