Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Client Script needed to populate normal variable based on Variable set variable

Dinakar_Reddy_K
Tera Contributor

Variable A is normal catalog variable

Variable B is a variable set variable

 

Now I need to populate Variable A based on selection in variable B (type: select box).

3 REPLIES 3

Chaitanya naram
Kilo Sage

@Dinakar_Reddy_K 

You can write a onchange catalog client script in catalog form on Variable B and set the value of Variable A
you can use g_form.getValue('B') or g_form.getValue('variables.B') to access B variable Value

Thanks & Regards | Chiranjeevi Chaitanya Naram
Kindly mark the answer Correct and Helpful if it helps to resolve your issue.

SANDEEP28
Mega Sage

@Dinakar_Reddy_K is catalog variable B a "Single line variable " or "Multi line variable set" ??

 

If its "Single line variable" set then its pretty simple which you can achieve it using by creating onChange client script in catalog item.

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!

Dinakar_Reddy_K
Tera Contributor

its a multi line variable set.