How make a filed in a variable set ReadOnly based on a filed on another Variable set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2022 12:44 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2022 12:50 AM
Hi,
images are missing
you can use onChange client script on your catalog item and achieve this
what's the challenge?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2022 12:56 AM
you could use like this in client script
var myVar = g_form.getValue("variables.variablename");
if (myVar == "value")
{
g_form.setReadOnly("variablename",true);
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2022 04:23 AM
There are two variable sets, under which variable set I should write client script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2022 07:02 PM
you can write client script. Applies to catalog item not on variable set
Harish