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

Kartik Sethi
Tera Guru
Tera Guru

Hi @Dee S 

 

This requirement is pretty straightforward and can be achieved using a UI Policy (or Client Script). You can access all the variables of:

  • Catalog Item
  • Variable Sets used in the Catalog Item

Remark: Only the variables of a Multi-Row Variable Set (MRVS) are not accessible directly.

 

If you are dealing with variables in MRVS then you can follow below mentioned community threads:


Please mark my answer as correct if this solves your issues!

If it helped you in any way then please mark helpful!

 

Thanks and regards,

Kartik

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Dee,

Client Script can be created in variable set "'General Info".

Client Script

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
    }
    g_form.setReadOnly('ec2_creation_instance_type', true);
}

find_real_file.png

Execution result. "EC2 creation instance type" becomes readonly when a value is entered into UserGroup.

find_real_file.png