Hide/Unhide variable on particular catalog task

Kiran Patil3
Giga Expert

Hi

Trying to solve below scenario.

How can we hide one particular variable in one of the catalog task in workflow but should 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, workflow will generate second catalog task Task 2. Variable 'A' should not be visible on Task 2.

What are the options here, please suggest.

Note: We have tried UI policies and Catalog client script (which does not support event for specific catalog task) and also we dont want to add UI action on catalog task table for specific service. Looking for some generic approach.

Thank You

11 REPLIES 11

Rahul Shandily3
Giga Guru

Hi Kiran,

 

You can write a client script - onLoad (not Catalog Client Script) on the task form. 

 

btw, how do you recognize Task 1 and Task 2 ?

You can write a specific script which will check as which is Task1 and show that variable else it keeps it hidden. your variable will only be visible on TASK1 and none of the other tasks created.

 

Best Regards,

Rahul

Please mark Correct/helpful if it solved your query.

purbalipc
Tera Expert

If you are generating task with Catalog task activity of workflow you have the option to select which all variable you want to show.

Please see the screenshot.

 

find_real_file.png

 

 

 

PS- Please mark answer correct or helpful if appropriate.

 

 

Regards,

Purbali

Hello,

I've been unable to get this to work recently. If I select certain variables from the slush bucket it still populates that Catalog Task with all variables on the RITM. Is there possibly something I am doing wrong?

Thanks!

puneetgoels1
Tera Guru

I also faced this condition and raised a Hi ticket. Service now does not have a solution for it but they provided a work around. Create a UI policy for that catalog item applies only to catalog task. 

 

In script on basis of short description using various if conditions you can set the attributes(mandatory/readOnly/Visible) of fields as required. 

 

It worked for us that way. Let me know if you need more info on that