Skip to main content
Nintex Community Menu Bar

Control Rules Not Firing When Custom JS Is Added

  • October 13, 2016
  • 3 replies
  • 20 views

jesse_mchargue
Forum|alt.badge.img+12

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:

193161_pastedImage_1.png

  • 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!

3 replies

Forum|alt.badge.img+9
  • October 14, 2016

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


Forum|alt.badge.img+5
  • Nintex Partner
  • October 18, 2016

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?


jesse_mchargue
Forum|alt.badge.img+12

Should have looked here first!

193491_pastedImage_1.png

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!