- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 12:54 PM
Hi guys,
I'm struggling to achieve the following: based on a variable value change (select box variable) in a catalog item (located directly on the catalog item), I need to display or hide another variable inside of one MRVS.
Is that possible?
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 01:21 PM - edited 07-01-2025 01:22 PM
Hi @Dennis17 ,
Try creating a duplicate hidden (select box) variable in the MRVS. Use a onLoad client script(in the MRVS) to populate its value in the MRVS. Once this is done you can use UI policies on the MRVS to conditionally show the fields. Sharing onLoad script for your reference.
function onLoad() {
//Type appropriate comment here, and begin script below
var type = g_service_catalog.parent.getValue("Variable on the catalog item"); //replace with variable on the catalog item
g_form.setValue("Variable on the MRVS", type); //replace with variable on MRVS
}
This has worked for me in the past. Hope this helps.
Please mark this response as correct or helpful if it assisted you with your question.
Thanks,
Rishi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 12:59 PM
I don't know that this is possible. Can you have two MRVS and display one or the other based on your trigger variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 11:08 PM
Hello!
It's a good workaround but I need to display as mandatory or readonly other variables on SCTASK level and I would have to duplicate all developments...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 01:21 PM - edited 07-01-2025 01:22 PM
Hi @Dennis17 ,
Try creating a duplicate hidden (select box) variable in the MRVS. Use a onLoad client script(in the MRVS) to populate its value in the MRVS. Once this is done you can use UI policies on the MRVS to conditionally show the fields. Sharing onLoad script for your reference.
function onLoad() {
//Type appropriate comment here, and begin script below
var type = g_service_catalog.parent.getValue("Variable on the catalog item"); //replace with variable on the catalog item
g_form.setValue("Variable on the MRVS", type); //replace with variable on MRVS
}
This has worked for me in the past. Hope this helps.
Please mark this response as correct or helpful if it assisted you with your question.
Thanks,
Rishi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 11:10 PM
Hello!
It looks a good solution but I think we still have the issue to get the change from catalog item... I would need to get the variable value change on catalog item level and based on that, display or hide a variable on MRVS level.