Show variable based on Assignment group in a catalog task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
I need to show Variable Categories only the assignment group changes to Support L2.
If assignment group is anything else except Support L2 it should not show the Variable Categories.
Variable Categories will be visible only on task when Assignment group is Support L2
Can anyone please help to achieve this.
Thank You!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
what are variable categories? Is your variable a reference field and you want to show some other values from that table?
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you can write onChange normal client script on sc_task table
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
if (newValue == 'L2 Support Group SysId')
g_form.setDisplay('variables.variableName', true);
else
g_form.setDisplay('variables.variableName', false);
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
somehow its not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
what didn't work?
what debugging did you do?
I informed to create normal client script and not catalog client script.
share what alert came?
did you use correct group sysId?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
what didn't work?
When i changed the assignment group to Support L2, it still did not show the Variable.
what debugging did you do?
I informed to create normal client script and not catalog client script.
tried doing client script normal
share what alert came? no alert came
did you use correct group sysId? yes