Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

UI policy for specific task

eyal abu hamad
Mega Sage

Hello, I want to do a UI policy that work on specific task from the workflow. is there any way to catch a specific task in UI policy? like for example the workflow have 3 tasks. I want to catch the middle task via UI policy and show and hide some fields.

3 REPLIES 3

Danish Bhairag2
Tera Sage

Hi @eyal abu hamad ,

 

In this scenario u need to use the usual way of creating UI policy just the change would be the condition & applies on catalog task level should be checked only.

 

In the condition u need to provide very specific scenario as in if a variable is true then do this on catalog task variable level.

 

Thanks,

Danish

 

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @eyal abu hamad 

 

Yes , you can do this. But what makes 2nd task different from the other 2 task? Add this unique value in UI policy and your work done.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

KasiramanathanD
Tera Contributor

Hi @eyal abu hamad ,

 

To apply a UI Policy specifically to tasks created through workflow/flow, consider the following options:

Option 1:

Build conditions within the UI policy to make it applicable only for the desired task. For instance, use unique values such as specific short description, and create a UI Policy condition like:

"Short Description is 'Short Description of the task goes here'".

 

Option 2:
Introduce a checkbox and set it to true for the particular task during it's creation through the workflow/flow. Utilize this checkbox in the UI Policy condition to determine whether to make the fields mandatory, read-only, or hidden based on the specific condition.