Skip to main content
Nintex Community Menu Bar
Solved

How to create an optional repeating section with field validation

  • August 5, 2019
  • 2 replies
  • 105 views
  • Translate

Hi,

I have a requirement to allow a repeating section to be optional but still contain validation rules if one or more rows is being added.

 

I've seen that you can't have 0 minimum rows for a repeating section so I'm trying to find another way to solve this.

 

The repeating section has two fields, one is a dropdown where the user selects a value and the other is a text field, if they are entering a value both the dropdown and text field need values in them. Putting a checkbox above the repeating section "Requires repeating section" and then using rules to hide the repeating section the validation still triggers when the repeating section is hidden.

 

I know the Validation Required property on the two fields supports the value Yes/No or Expression, is it possible to write an expression that checks the value of that checkbox indicating that the repeating section isn't required to mean the fields are no longer required? I haven't found an example of an expression anywhere in the documentation or these forums so I'm not sure what it should look like and nothing I've tried seems to work.

Best answer by SimonMuntz

Hi,

 

You can add to your rule to check if the checkbox is checked before validating the controls.

 

Example of one of the validation rules which checks the the checkbox before applying the rule.

and( CheckBox == true, isNullOrEmpty(Single Lines Of Text Control))

Please see the attached form example.

 

View original
Did this topic help you find an answer to your question?

2 replies

SimonMuntz
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • 2456 replies
  • Answer
  • August 6, 2019

Hi,

 

You can add to your rule to check if the checkbox is checked before validating the controls.

 

Example of one of the validation rules which checks the the checkbox before applying the rule.

and( CheckBox == true, isNullOrEmpty(Single Lines Of Text Control))

Please see the attached form example.

 

Translate

  • Author
  • 1 reply
  • August 6, 2019
Thanks, for some reason my form seemed to have corrupted that text field, your sample proved I was on the right track, I removed the control and added it again and it suddenly worked. It didn't seem to be accepting that I'd turned off the control validation and was wanting a rule to do the validation of that control.
Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings