Skip to main content
Nintex Community Menu Bar

Nintex Form - validation on multiple checkboxes

  • Jun 2, 2017 6:19 PM UTC
  • 14 replies
  • 52 views
  • Translate All

Forum|alt.badge.img+3

I have a form with a Choice column that has multiple checkbox enabled.  I want to ensure all the checkboxes are selected before the form can be submitted.  I have been unable to find any articles on setting up the validation

14 replies

Forum|alt.badge.img+3
  • Author
  • Novice
  • Jun 5, 2017 6:07 PM UTC

isNullOrEmpty({Self}) only requires one of the checkboxes be selected to pay the validation.  I need all the checkboxes to be select before the form can be submitted.

Translate

Forum|alt.badge.img+14
  • Scholar
  • Jun 5, 2017 8:05 PM UTC

Following validation formula might have worked for you

(assumed 5 options in choice control)

If(Array.isArray(ChoiceNamedControl),length(ChoiceNamedControl),If(length(ChoiceNamedControl)>0,1,0)) < 5‍‍‍
Translate

Forum|alt.badge.img+9

Hi ‌

Use validation rule length(Currency) < 8 (Currency is named control)

203781_pastedImage_2.png

 

Thanks,

Lakshmi Narayana C 

Translate

Forum|alt.badge.img+14
  • Scholar
  • Jun 6, 2017 6:27 AM UTC

this will not work if you only tick single checkbox - in that case it returns length of string not length of array...

Translate

Forum|alt.badge.img+9

203782_pastedImage_1.png

Translate

Forum|alt.badge.img+14
  • Scholar
  • Jun 6, 2017 7:16 AM UTC

hm, that's interesting...

what version have tested it on?

could you add two more calc value controls on the form, one with formula just 'Currency' and second one 'length(Currency)'

Translate

Forum|alt.badge.img+9

203788_pastedImage_3.png

203789_pastedImage_4.png

Translate

Forum|alt.badge.img+14
  • Scholar
  • Jun 6, 2017 8:00 AM UTC

and if you select just one checkbox?

Translate

Forum|alt.badge.img+9

203790_pastedImage_1.png

Translate

Forum|alt.badge.img+14
  • Scholar
  • Jun 6, 2017 8:26 AM UTC

thanks for example, Lakshmi Narayana C‌

functionality seems to be changed between 2.7.0.0 and 2.10.0.0, with former one it returns plain string instead of array of strings if single checkbox is ticked

Translate

Forum|alt.badge.img+3
  • Author
  • Novice
  • Jun 6, 2017 1:24 PM UTC

This works to display the message but when all the boxes are checked, the message is still displayed.

We are on version 2.5.0.0

Translate

Forum|alt.badge.img+14
  • Scholar
  • Jun 6, 2017 3:17 PM UTC

have you noticed my formula at the top?

it should work on older form version as well.

Translate

Forum|alt.badge.img+3
  • Author
  • Novice
  • Jun 6, 2017 3:43 PM UTC

I missed that formula.  I added it and the checkboxes are working correctly.  Thanks for the assistance.

Translate

Forum|alt.badge.img+14
  • Scholar
  • Jun 6, 2017 3:46 PM UTC

great!

Translate