- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2023 11:03 PM
Hi Community Family😍
Trying to solve below scenario.
How can I hide one particular variable in one of the catalog task but should not be visible on next task.
E.g. RITM request is submitted and Task 1 is active. Variable 'A' which should be visible on Task 1 and once Task 1 is completed, flow will generate second catalog task Task 2. Variable 'A' should not be visible on Task 2. And should be visible on TASK3.
What are the options here, please suggest.
Note: I have tried UI policy where I can handle only one Task but visibility for another I can't handle. Looking for some generic approach.
Thank You
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 02:57 AM
you said in your question you don't want to show it in Task 2 then why to add that variable in Flow Designer create catalog task action?
You want to show in Task 3 then add it there
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
11-13-2023 03:13 AM
If the Email field is displaying in all the catalog tasks, let's double-check the Global checkbox in the Email variable.
"Is there any client script is available ? like that email field should be available only for a particular assignment group then the issue would resolve."
I'm not sure your use case is to apply this On Load only or On Change the assignment group field.
If it just need to execute On Load, you can refer to the below approach.
1. Create On Load Catalog Client Script.
2. Check the checkbox Applies on Catalog Tasks.
3. Do the validation on the assignment group and set display accordingly.
Sample below.
function onLoad() {
if(g_form.getValue('assignment_group') !== '<the_sys_id_of_group>'){ //replace your assignment group sys_id
g_form.setDisplay('email', false); //replace your variable name
}
}
The script above is hard-coding. If you don't want to do that, you can define a system property and do an AJAX call to do the validation.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 03:13 AM
If the Email field is displaying in all the catalog tasks, let's double-check the Global checkbox in the Email variable.
"Is there any client script is available ? like that email field should be available only for a particular assignment group then the issue would resolve."
I'm not sure your use case is to apply this On Load only or On Change the assignment group field.
If it just need to execute On Load, you can refer to the below approach.
1. Create On Load Catalog Client Script.
2. Check the checkbox Applies on Catalog Tasks.
3. Do the validation on the assignment group and set display accordingly.
Sample below.
function onLoad() {
if(g_form.getValue('assignment_group') !== '<the_sys_id_of_group>'){ //replace your assignment group sys_id
g_form.setDisplay('email', false); //replace your variable name
}
}
The script above is hard-coding. If you don't want to do that, you can define a system property and do an AJAX call to do the validation.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2023 11:40 PM - edited 11-12-2023 11:48 PM
Hi @Bheemaraju Vagu,
Let me know your using workflow or flow designer for creation of catalog tasks.
If you your using workflow, In task 2 variables you can in that variables below you can make that specific variable not visible in catalog task. for your reference please find the screenshot.
let me know still your not getting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 12:31 AM
Hi siri
I'm Using Floe Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 12:45 AM - edited 11-13-2023 12:46 AM
Hi @Bheemaraju Vagu ,
could you send the variables of second catalog task , first catalog task and 3 catalog task. with value in that variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 12:57 AM
I have a requirement like
1. I have to create a field as "Enter your email" on SCTAST1 After fill the details the assigned person close the task.
2. After that new task would be generated eg.TASK2 then, after closing the task2 another task3 would be generated.
3. Now in TASK3 we need get that Email field with value also and that should be non-editable then after checking that email correct or not then close the Task3 Also