The CreatorCon Call for Content is officially open! Get started here.

How to hide a field with UI action

gunishi
Tera Guru

Hi there, 

 

I have a UI action for a button and upon pressing this button I am going to make a field visible (this will be call Cancel Reason). 

 

How would I make sure field is hidden before this? Would I need to use a separate UI policy/action to hide the field? And how would this work with the button that then reveals it?

 

Many thanks 🙂

G

1 ACCEPTED SOLUTION

Pratiksha2
Mega Sage

Hello @gunishi ,

Establish a UI Policy, set its conditions, and, within the dictionary record, locate the "UI Policy" field. Choose the created UI policy from the dropdown to specify which field you wish to hide.
Include the following script in your UI Action:

 

gsftSubmit(null, g_form.getFormElement(), 'your_policy_name');

 

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks,

Pratiksha

View solution in original post

8 REPLIES 8

Pratiksha2
Mega Sage

Hello @gunishi ,

Establish a UI Policy, set its conditions, and, within the dictionary record, locate the "UI Policy" field. Choose the created UI policy from the dropdown to specify which field you wish to hide.
Include the following script in your UI Action:

 

gsftSubmit(null, g_form.getFormElement(), 'your_policy_name');

 

 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks,

Pratiksha

Hi @Pratiksha2 

 

Thanks for this! Exactly what I was after 🙂

Kind regards, 

G

You're Welcome!
Happy to help you!😊

Thanks,
Pratiksha

Experience 🙂 

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

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