Hello,
I am going to offer you a simple solution, avoiding custom validation and using the built in rules functionality of the product. As you have seen, disabling a control does not disable a validation rule placed on it. The good news is that you can add functionality to your validation rules to make this work nicely.
Here is how you can modify your Nintex Validation rules to get this to work:
and(isNullOrEmpty({Self}), equals(YourChoiceControl,"A"))
The rule above first checks to see if the control {Self} is null or empty which would be replaced by your current rule, the second part is the magic that says make this validation happen only if YourChoiceControl is equal to A. In other words, the validation won't be activated if your user selected B.
Hope that helped!
Mike
Thanks Mike, that worked a treat!
I tried something similar but think my formula must have been wrong.
Hi Mike,
I may have jumped the gun on this.
I have a form in which the rules will disable the field sucessfully, however, on submit the fields error out as they are required.
In the above snippet the highlighted fields are required fields and are disabled when the guest button is selected. unfortunately, they error on submit.
The form has 2 panels, one for "Guest" and another for "Member or Staff"
I've tried other variations on formulas e.g. equals(Tabs, "Guest")
My end goal is to have a rule that will disable(and allow submitting) and hide the panel not selected.
Any ideas?
Cheers
Jon
Hi John,
Remove the "required" aspect from the fields in the backing SharePoint list, and let the Nintex Forms validation rules do the trick on the front end making them required only when necessary (as described by the rule) . This will get you the flexibility that you need. Otherwise, if you are forcing the fields to be required at the Sharepoint list level, then there is nothing Nintex can do on the front end to prevent you from having to enter data. Nintex will simply respect the "required" settings of the SharePoint list.
Hopefully that answered your question or gives you further direction on how to achieve this.
Thanks,
Mike
Thanks Mike, that makes sense. I hadn't thought of it in terms of SharePoint vs Nintex.
Hi, Mike!
I have almost the same problem the only difference is that I use checkbox with rules that allows me to hide the panel and fields but the disable option of the validation does not take effect. Will this formula be also applicable to my case? Thanks!
Hello TC N,
The rule may have to be modified slightly in your case - when using a checkbox in a rule, simply the name of the checkbox itself inserted by double clicking on it in the rules pane - in other words a reference to a checkbox will return true if checked and false if not. If you let me know what you want to happen when the checkbox is checked or unchecked I can probably elaborate more clearly.
Thanks
Mike
Hi Mike,
If you're still available, how do you change the "Mandatory" field in SPO?
Thanks!