Hello everyone,
I've got a big issue with multiple forms in multiple subsites.
I wrote some validation rules like this :
isNullOrEmpty({self}) && equals(ExampleControl, « example »)
It worked fine for more than a year.
But, last friday, all the validation rules with "isNullOrEmpty" stopped working.
The rule was supposed to work when my control "ExampleControl" (which is a choice control) was set on "example" AND the single line text ({self}) was not empty.
Now, even if the "ExampleControl" is set on another choice than "example", the validation works.
Even if the "ExampleControl" is set on "example" AND the single line text ({self}) is not empty, it works too.
But it doesn't respect my rule.
I saw this issue in other request with some replacement like instead of "isNullOrEmpty" => equals({self}, "") and it works.
But i want to know why is this happening from one day to another.
Thank you for helping me.
I just tested this for you in the newest release of forms for 2013, Version: 2.9.4.0
, and the "equals" function seems not to be working correctly against a choice control. When i use == instead of equals it works as expected. You may want to report this as a bug to nintex support.
equals(choiceControlreference, "example") ---- passes validation when example is selected
choiceControlreference == "example" ----triggers validation when example is selected
Anyone seeing this? What version are you on.
Testing now in Nintex 2013, Version 2.9.0.0.. works as expected. Must be an issue introduced between versions somewhere...
for me it works both ways on 2.9.4.0
any changes (upgrades, patches,...) on your environment?
have you tried to dig into it deeper?
eg. any error on developer console
how does evaluate {Self}
how does evaluate isNullOrEmpty({Self})
hasn't {Self} changed somehow from referenece to simple text
etc.
Can you guys test it using the "checkbox" mode of the choice control? Perhaps only in this mode is the glitch becoming evident.
This mode allows for multi-select, but the single selection of "example" does not function correctly as I described above. I'd like to know if you experience the same.
in case of possible multiselect control returns array of values, so InArray() function should be used to validate an option is chosen
equals() probably takes it literally and so fails, whereas javascript recognizes single value in an array and compares it as string
Ah ha, you are correct sir..
Those are among some of my favorite words to hear. LoL. (I do jest).