How to Display fields on basis of catalog task

puneetgoels1
Tera Guru

In my workflow, there are around 20 catalog tasks and there are 100 fields all together. I need to display selective fields on the basis of catalog task e.g. task 1 show 5 fields and hide others, task 2 show 10 fields and hide others and like wise.

How can it be achieved efficiently?

1 ACCEPTED SOLUTION

puneetgoels1
Tera Guru

Correct Answer: Catalog UI Policy or UI policy do not work on the conditions on short description of task. It works only for catalog item variables and short description like fields be it at request item level or catalog task level in scoped application.



So the way to achieve it is write a UI policy at global level, put a condition for the catalog item and use the script to implement it


View solution in original post

40 REPLIES 40

Sharique Azim
Mega Sage

Arindam Ghosh
Mega Guru

you can create an hidden field on sc_task table with different choices. Initialize that field using script in WF, in catalog task block. Now use the same field in UI policy to display the fields.



Thanks,


Arindam


I am following the same approach but the problem what I am facing is if I add policy action it works but if I want to do it through script it is not working. I can't go with policy action as it will make 20*100=2000 records.



Script work should be easy but it is not working for me. I am using like



g_form.setDisplay('u_app_team_assignment_group',false);



Let me know if there is any other way of doing it in case of UI policy


use on load client script.