- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2024 10:52 PM
Hi Team,
I have one variable and some drop down which is configure in variable set and used by 3 catalogs ,I need to hide it in Once catalog Kindly let me know How i can achieve it
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2024 11:12 PM - edited 07-17-2024 11:13 PM
Hi @vinitaraico,
Go to Service Catalog > Catalog Definitions > Maintain Items.
Open the catalog item where you want to hide the variable.
Navigate to the Catalog Client Scripts related list and click New.
Set the Type to onLoad.
function onLoad() {
g_form.setDisplay('variable_name', false); // Replace 'variable_name' with the name of your variable
}
Thank you, please make helpful if you accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2024 11:06 PM
Hi @vinitaraico
OK, we figured it out. We had to take the "negative" approach rather than the "positive" one to do it. So in the first Variable Set, we would need to set up the Catalog Client Script like this:
Catalog Conditions: Field A2 is NOT "Other"
Reverse if False: Checked
Catalog UI Policies Actions:
Variable Name: Field A3
Mandatory: False
Visible: False
Clear the variable value: Checked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2024 11:12 PM - edited 07-17-2024 11:13 PM
Hi @vinitaraico,
Go to Service Catalog > Catalog Definitions > Maintain Items.
Open the catalog item where you want to hide the variable.
Navigate to the Catalog Client Scripts related list and click New.
Set the Type to onLoad.
function onLoad() {
g_form.setDisplay('variable_name', false); // Replace 'variable_name' with the name of your variable
}
Thank you, please make helpful if you accept the solution.