- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2016 02:55 PM
Hi,
Is it possible to show a catalog variable on a specific task record by a workflow, but not show it in the original catalog request form?
So for example my workflow creates task "A". When task "A" is complete, it creates task "B". When "B" is complete, it creates task "C". I only want this variable field to show and be required on Task "C" within the variable editor, but hide it from Task "A" or "B".
And then even further, after task "C" I want another task created "D" which then shows the field that was filled out in Task "C".
I couldn't find any conditions in the UI Policy that would allow me to do this. I know this is possible to do using UI Policies for request form vs (request items and catalog tasks), but not sure on an actual specific task deep within the workflow.
Thanks,
-Tyson
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2016 07:00 AM
Tyson,
They would be catalog client scripts. I say that because catalog scripts have the following checkboxes:
- Applies on a Catalog Item view
- Applies on Requested Items
- Applies on Catalog Tasks
For the first script (hide on initial request), you would choose 'Applies on a Catalog Item view,'
'Applies on Catalog Tasks' would be selected for the second script (Setting to mandatory/visible on task).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2016 03:28 PM
Hi Tyson,
This depends on whether or not you are running the workflow on the sc_req_item table. If so, workflows have a 'Catalog Task' activity that allows you to select the variables that are visible. If you're running the workflow on any other table, it only gives you 'Create Task,' which I believe is missing that functionality.
If you're able to do that, then you'd move on to hiding the field You'd have to create a Client Script because it gives you the option to only run on the catalog item.
The script would be something like:
g_form.setMandatory('myField','false');
g_form.setVisible('myField','false');
To make the item mandatory on the one item, you'd have to reverse that script (set to true) and condition it to only apply to a specific task (if assigned to uniqueGroup, or if description is unique).
I hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2016 08:38 PM
Thanks for the quick response.
Where do you create the 2nd client script which forces the variable field
required based on assignment group? A client script on the sc_task form or
a catalog client script?
On Dec 21, 2016 5:29 PM, "jleslie2007" <community-no-reply@servicenow.com>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2016 07:00 AM
Tyson,
They would be catalog client scripts. I say that because catalog scripts have the following checkboxes:
- Applies on a Catalog Item view
- Applies on Requested Items
- Applies on Catalog Tasks
For the first script (hide on initial request), you would choose 'Applies on a Catalog Item view,'
'Applies on Catalog Tasks' would be selected for the second script (Setting to mandatory/visible on task).