cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
jesse_mchargue
Nintex Newbie

Control Rules Not Firing When Custom JS Is Added

Jump to solution

I stumbled upon a strange issue and I can only guess at the reasoning, so I hope someone has a bit more insight on to the specifics of why.

Scenario:

  • I have a form with a custom JS function in which I am updating a "hidden" (tucked behind a label so users do not edit it) based upon a calculated field. These fields are date only. I am triggering my JS function on the Save button. Here is the JS function:

  • I have a validation rule attached to a different control on the form. It is a simple (IsNullOrEmpty({Self})) rule.

I cannot get the validation rule to fire properly while I have the JS function in my form, but if I remove it, the rule fires as expected. I have tried doing a simple window.alert("Hello World!") function, and the rules fire just fine, so what am I missing?

Is this because I am attempting to update a field just before submit? Is this interfering with the normal validations?

I removed the field update and baked it into my workflow since it is a simple column update, but this has been nagging at me most of the week and I cannot get a good answer on why it is happening.

Thanks in advance!

0 Kudos
Reply
3 Replies
mlauer
Nintex Newbie

Re: Control Rules Not Firing When Custom JS Is Added

Jump to solution

Any errors in developer console? Is 'disp' method available?

Reply
thomas_xu
Nintex Newbie

Re: Control Rules Not Firing When Custom JS Is Added

Jump to solution

Yeah this can happen if you have some javascript error on page load. Hit F12 and double check.

Perhaps attach your form so I can help you take a look?

Reply
jesse_mchargue
Nintex Newbie

Re: Control Rules Not Firing When Custom JS Is Added

Jump to solution

Should have looked here first!

I removed that line since I am doing this just before submit and there is no need to display the data to the user. We just need to update the list field.


Thanks!

0 Kudos
Reply