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..
Right on, I just wanted to confirm that equals in and of itself does fail for you as well. That's a good starting point for a workaround for which can be modified to mimic the equals req with a little work.
Those are among some of my favorite words to hear. LoL. (I do jest).
Thank you guys for your help but the problem is not really the equals().
I'll try to explain better my issue.
I have a single line text control which is disabled and hidden if the choice control is set to "No".
If it set to "Yes", the single line text control is enabled and visible AND is obligatory.
The real problem is it worked for more than a year!
And now it stopped working!
I understand that maybe the isNullOrEmpty is not the perfect function for this but it worked before. And now there is more than 900 workflow working on.
All your solution works for me, but I really need to find a way to understand why all the validations stopped working from one day to another.
Anyway, thank you for your helps even if it's not answering exactly, it make me see some better stuff to do in the future.
I have a single line text control which is disabled and hidden if the choice control is set to "No".
how do you disable and hide controls? rule appearance settings?
is configured directly for single controls or do you have controls in a panel and settings applied on a panel?
have you investigated it further as I suggested above?
Did you upgrade your Nintex version recently? Breaking changes are not totally common, but they do occur.
Hello ,
The control is hidden and disabled by another rules with just an equals().
it's configured directly for single controls.
There was absolutly no changes on the environment, no updates of nintex, sharepoint, windows, etc..
No error in the dev console.
Hello ,
No upgrades recently. And the sql db is not full at all.
Hello Pierre,
Just one more clarification: Are you using a Yes/No check box, or a choice control? Originally I thought you were using a choice control, but now it sounds like maybe you are using a Yes/No checkbox.
Reason being, that long ago the isNullOrEmpty used to work on a Yes/No checkbox - then along came a new version of Nintex that made the rule no longer function with the Yes/No checkbox (the fact that isNullOrEmpty had originally worked was described to me as a glitch by support...Strange right?)
I can't really explain a sudden change without any modifications, but I do know an upgrade could cause this.
what about patches/upgrades at client side, especially ones related to browser?
btw, have you tried how does it work in another browsers?
No, it's a choice control.
I knew this fact too, I thought about this immediatly but this validation rule stopped working for other controls like people/picker...
Yes that's pretty strange, I know....
I had this issue with an upgrade before, but this is absolutly not the same..
And now it seems working, but I don't know why......
I'll let you know what causes this bug if I find.
Thank you.