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.

Make UI Action button appear with onclick event?

matthewt
Kilo Contributor

Here is the behavior I want.

1. User clicks checkbox.

2. Button appears (UI action) without updating the form.

Is this possible? If so, how?

1 ACCEPTED SOLUTION

shloke04
Kilo Patron

Hi,



This can be done using a UI Policy. Please follow the steps below to achieve the same:



1) For example I have a UI Action Named "Create Task" on the Incident form which I want to hide based on a checkbox field named "Checked" on the Incident form.



2) So Configure a UI Policy as shown below:



find_real_file.png



find_real_file.png



While Configuring the UI Policy "Make sure the "On load" & "Reverse if false" is checked on the UI Policy form.



In the above script Just rename "hide_check" with your UI Action Name which you want to hide. For example below is my UI Action and my action name is also highlighted below as shown:



find_real_file.png




Result:



I have checked the field "Checked" and then UI Action "Create Task" is visible as shown below:



find_real_file.png



If you uncheck the UI Action does not gets displpayed.



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

11 REPLIES 11

Dave Smith1
ServiceNow Employee
ServiceNow Employee

Why require a checkbox to reveal the button?


Sorry, that doesn't answer the question. The reason should be irrelevant, I simply want to know if it's possible.


Dave Smith1
ServiceNow Employee
ServiceNow Employee

Well, in that case - yes... it is possible.


Not trying to be rude... But how do either of your answers help me?