- 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 12:32 AM
Could you please provide me the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 12:35 AM
If you know which variable to show/hide then why to include that variable in 2nd catalog task in the flow designer?
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 12:42 AM
Once filling the details in TASK1 after closing that that Task, the field should available in Task 2 that is scenario.
- 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 06:05 AM
Thank you for marking my response as helpful.
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