Skip to main content

Hello,

I'm new to Nintex and would like to know how to use the validation required option of a field.

There I can choose validation required between "yes", "no" or "expression". I think if I use the option "expression" I have to write an expression into that offered field. And now if that expression is evaluated to true the validation would be processed otherwise the validation would not be processed.

Is my opinion correct?

What I want to get working is the following . In a from a field is a dropdown list. The user has to select one enty if he has set another field - in my case this is an radio button with two options eg. "type1" and "type2" - to "type1". If that radio button is set to "type2" the validation of the dropdown list is not necessary and the value can be ignored.

Thanks in advance for your help.

Hi Martin,

Validation required just means if that control is firing a validation (yes) or if all validation is disabled (no) or if it depends on other circumstances on the form and so on (expression).

The validation itself, especially if other controls have to notice what to do, should be done in a rule. I don't know what kind of validation you are doing but in the scenario described your rule of type validation added to the drop down could be

Control is invalid if

and(equal(NAME OF YOUR RADIO BUTTON, "type1"), isnullorempty({self}))

The rule checks if the radio button has the value "type1" AND if the current control - the dropdown - is empty. In that case it marks the dropdown as invalid. If the radio button is type2 or anything else the dropdown will always be valid.

Does this help you?

Kind regards,

Enrico


Hi Martin,

I think your opinion is correct. If you enter an expression for your validation and this expression evaluates to false you will not be able to submit the form.

However, beside using the built-in validation of the control you could also use rules to create validation rules. The advantage of a rule is that it has more power. For example you can access all the controls of your form inside a rule.

To do that, you mark your dropdown list and select "Add Rule" in the ribbon. You can then change the name of your rule, the rule type to "Validation" and create your condition like this:

196180_pastedImage_3.png

This rule will now make your dropdown list invalid if radio button "type1" is chosen and your dropdown list does not have a value chosen at all. Which means as soon as your radio button "type2" is chosen, the dropdown list is valid.

If you need help to find out which radiobutton/ddl values to check for you can use your browsers developer tools to find out what values are used for your controls internally. On regular controls it should work with the values you provided.

Let us know how that works for you!

Regards

Philipp


Thank you! I got it now. But I think if there is such an option, it should be used and should work. Also it should be well documented.


Well, it is used (at least by you and me silly.png) it works (most of the times wink.png) and it is also documented. You can find the only help here: Rules pane 

Additionally you have a "Help" button in your forms designer where you can also find a documentation about the rules. And if this still isn't enough, you have the community to help you! What else are you asking for?


Reply