Executing UI Policy on form submit

Pradnya6
Giga Contributor

Hi,

I have created a UI policy to check the certain values entered in the text box for e.g. the value length and no special characters. Before submitting the form I want to execute the UI policy and to stop form submission.

Please suggest, how can we execute UI policy on form submission.

6 REPLIES 6

Pradnya6
Giga Contributor

Is there any way to execute UI policy on text field change. I have written a UI policy to check "Name" is not empty and the value entered is valid in "Execute if true" script. I have observed, this UI Policy executes only on form load because the revers condition is never satisfied. Is there I am missing anything ? As I wnat to execute this UI policy on change of name. Please suggest.


Hi Pradnya,

As you are using UI policies on the text filed change so definitely you will have to use Script section on UI policies form. and write code in Execute if true and Execute if False. because Script in used for change the field action in UI policies. for more details go through following link:
http://wiki.servicenow.com/index.php?title=Creating_a_UI_Policy


Thanks ! I have created a UI policy as specified in the wiki. In wiki example the UI policy can work because it is on a choice field. The UI policy works fine on choice list and check box even on reference field but it doesn't work on change of free form text field. Any new fresh idea how we can achieve it on change of text box value.


Hi ,
See Attached file if is useful and change the condition according to your requirements. for more detailed information come on skype.

Thanks
Mukesh
Skype Id: mukesh_servicenow