How make a filed in a variable set ReadOnly based on a filed on another Variable set.

Dee S
Giga Guru

I've created two variable sets 'General Info', 'Provision' in a  Cloud catalog item

General Info variable set has a field 'UserGroup'

Provision variable set has a field  'EC2 creation instance type'

Question: On selecting particular value from 'UserGroup' Field, the 'EC2 creation instance type' field should become ReadOnly which is in another variable set

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

images are missing

you can use onChange client script on your catalog item and achieve this

what's the challenge?

Regards
Ankur

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

Harish KM
Kilo Patron
Kilo Patron

you could use like this in client script

var myVar = g_form.getValue("variables.variablename");

if (myVar == "value")

{

g_form.setReadOnly("variablename",true);

Regards
Harish

There are two variable sets, under which variable set I should write client script?

you can write client script. Applies to catalog item not on variable set

Regards
Harish