PLEASE HELP!! UI Policies and Task Variables

paradise623
Giga Expert

Hi All,

I am having an issue and I would LOVE to get some help! I am working with the Service Catalog that has a task within the workflow. On that catalog task in the workflow I put all the variables for all the requested items (boxes, telephone, and locks) on the catalog task in the workflow and then hid them with the UI policy that I created for the request items.

So I added all the items on the task form from the workflow, then I went to the UI policy and checked "applies on catalog task".. but for some odd reason ALL the variables from the items are showing on the task form instead of the ones selected to show on the UI Policy.

For example:

Request items from the Service Catalog

Boxes,

Telephone

Locks

If I select boxes as my requested item and then go to the task page, the variable for not only boxes show up but the variables for telephone and locks show u as well!

What is going on here!? The UI Policy tells it to show only when a certain group is shown and the item is boxes. So why would all the variables show up if I'm telling it through the UI Policy to allow it to show if only "boxes" is the requested item and the group is "A"

1 ACCEPTED SOLUTION

I would like to give an update on this issue. I finally figured out the cause. In order for the variables to show properly on the task form using the UI policy I had to make all my variables true under the global option. If this is not available on the form/ list view, you can add it.



Thanks Everyone for all your help!



Problem Solved!


View solution in original post

5 REPLIES 5

ghsrikanth
Tera Guru

By default the other variables will be shown, in the UI policy you have to exclusive write a UI Policy action for Telephone and Locks that when boxes are selected, those variables visible = false.



Hope it is helpful.


paradise623
Giga Expert

Hi Srikanth,



Thanks for the rapid response!



I got it.. But won't it screw up the requested item form? because on the requested item form. There is a dropdown box that has all three request items and depending on which item you select different variables show up based on the UI policy. However when I get to the task form in which the UI policy is also running, it shows all the variables instead on the ones selected on the requested item.




This is how my UI policy is currently running....



Condition:


If requested item is "boxes" ... and,,,


the user group is "A"...   show these variables...



If requested item is "telephone" ... and,,,


the user group is "A"...   show these variables...



If requested item is "locks" ... and,,,


the user group is "A"...   show these variables...


ghsrikanth
Tera Guru

Yes, the variables that you hide in Catalog Form wont be hidden in the task that gets created. The UI policy gets applied only to Catalog form.


We also faced this kind of issue, we have a Catalog form which submits change request - in the change request all the variables of the catalog gets displayed.



In this case, we have written an onLoad script to hide form variables in the change request.


1. See if you can access the variables in the UI policy for the task


OR 2. Try to g_form();   in an onLoad script //i feel it wont work


OR 3. You can try to do DOM manipulation like identify the ids of the variables and use gel(id) and use .display = none



Hope it will be helpful


Thanks for your help. I will keep working at it