ITSM Ui Policy hide filed based on onload

sushma9
Tera Contributor

Hi All,

 I have two fields  1. required , 2. include . with scripting i am assigning the data inside the those two fields  based on conditions . if condition 1 matches then field "required "  will  be auto populate some date  with script . if condition 2 matches then  "include"  filed will auto populate some date  .

 

I have written a Ui policy and if filed one(required )is empty then show the filed two and hide the filed one. if the field two (include ) is empty  then filed two will be hide and field one will be visible .

I have tried but not  working . Can any provide me the solution to the issue.

 

Thanks in Advance .

 

 

 

12 REPLIES 12

Dr Atul G- LNG
Tera Patron
Tera Patron

Please share the code snippet here to test/ check.

*************************************************************************************************************
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]

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

@Dr Atul G- LNG 

Please find the Ui Policy  details .

sushma9_0-1702318788254.pngsushma9_1-1702318805734.png

 

AshishKM
Kilo Patron
Kilo Patron

Hi @sushma9 ,

You can try your existing code/logic with updated UI Policy order, keep the order number different, both should not the same.  Avoid using UI Policy with same order number if same set of fields are used in UI Policy Action list.

 

If order change not work, then write the same logic in Catalog Client Script. 

 

-Thanks,

AshishKMishra


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

sushma9
Tera Contributor

@AshishKM 

Please find the ui policy details .

sushma9_2-1702318837156.png

sushma9_3-1702318855652.png