When to apply UI Policy(Eureka) "On load"

Stephen W_
Giga Guru

In Eureka UI Policies now have a little checkbox to "Apply the catalog UI policy actions when the form is loaded or when the user changes values on the form"

The description is incorrect, stating that it is one or the other.     But it seems like they forgot to add another checkbox.

The effect is actually onLoad and onUpdate when "On load" is checked, and onUpdate when it is not checked.  

How can I set it to fire only onLoad, and not also onUpdate?

Thanks,

-Stephen

1 ACCEPTED SOLUTION

//Uncheck the Option Reverse if false, and it will not run on update//



Reverse If False means it will literally do the opposite to the fields if the conditions are not met.   Think of it like a toggle.



UI Policy: "Hide field if Status is Closed"


Reverse if false = "Show field if Status is not Closed"



Either way, it still runs when you change a field value.



The original post is absolutely correct.   They should have given us two checkboxes: On Load, and On Field Change.   A third would be nice: "On Before Save"


View solution in original post

6 REPLIES 6

manikorada
ServiceNow Employee
ServiceNow Employee

Stephen,



UI policies always run on update of the fields. So, if you want something to run only onLoad you need to use Client script for this.


ServiceNow recommends using UI Policies whenever possible instead of client scripts.   Client scripts give us plenty of power, but if they let us select "onLoad", they should definitely let us select "onUpdate" as well..