- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2014 02:32 PM
When the customer is submitting their catalog request item, I don't want one of the variables to display, so in the onLoad script I do this:
g_form.setDisplay('STT_Opera_opsTransitionLead', false);
When the first task is created from the workflow, I want the person who gets the TASK assigned to them to have to fill out that variable, so I created a catalog UI policy that sets Mandatory and Visible to true. For that policy I set "Applies to Catalog Task" to true, and "Applies on a Catalog View Item" to false.
Finally, within the Catalog Task on the workflow editor I included that variable on the TASK display.
When I open that task, the variable is not displayed. So that's problem 1.
Problem 2 is that I can "close complete" the task even though there's no value set for that variable.
help?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2014 09:26 AM
This is now (since Calgary) handled through Catalog UI Policies.
Service Catalog UI Policy - ServiceNow Wiki
You need to create a Catalog UI Policy for the item, on the form there are three check boxes:
- Applies on Catalog Tasks
- Applies on Requested Items
- Applies on Catalog Item view
Here is where you can set all of that so you don't even have to use that onLoad script to hide as you can specify all your conditions on a series of Catalog UI Policies.
Always bear in mind it gets tricky when you have several UI Policies on how to use the Order and Reverse if false field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2014 10:37 PM
Does the variable display on the Requested Item form?
The one thing that comes to mind is you may have something specified on the "Read roles" field for the variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2014 10:00 AM
Hi Jim,
unfortunately there are no read roles set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2014 10:36 AM
I've discovered that any variable which is blank when the catalog form is filled out will not appear visible on the TASK, whether or not you've asked for it. Not sure how to disable.
In this specific case the field is a Reference to sys_user, so I set the value at startup to 'FILL ME IN' and then hide it. Technically it has a value so it appears on the TASK form, but the field is blank as 'FILL ME IN' isn't valid. So that solves step one (make it appear on task).
Now my only issue left is how do I ensure that they can't close the task as being complete until there is actually a value filled in there? The UI policy marks it mandatory at that point, and I do see the red bar, but the task doesn't bother to look at the when it's being closed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2014 12:59 PM
look for a BR on the catalog task form called Hide Empty Variables
this is probrably the culprit.... keep in mind if you disable this variable you will need to come up with a way to hide any variables that are empty that you don't WANT to show on the task form... i am thinking when we get to dublin we may need a setting for show on catalog task.. then we can use that variable with a simple yes no setting to skip that variable.