Skip to main content
Nintex Community Menu Bar

Nintex Form - validation on multiple checkboxes

  • June 2, 2017
  • 14 replies
  • 39 views

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
  • June 5, 2017

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.


Forum|alt.badge.img+14
  • Scholar
  • June 5, 2017

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‍‍

Forum|alt.badge.img+9

Hi

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

203781_pastedImage_2.png

 

Thanks,

Lakshmi Narayana C 


Forum|alt.badge.img+14
  • Scholar
  • June 6, 2017

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


Forum|alt.badge.img+9

203782_pastedImage_1.png


Forum|alt.badge.img+14
  • Scholar
  • June 6, 2017

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)'


Forum|alt.badge.img+9

203788_pastedImage_3.png

203789_pastedImage_4.png


Forum|alt.badge.img+14
  • Scholar
  • June 6, 2017

and if you select just one checkbox?


Forum|alt.badge.img+9

203790_pastedImage_1.png


Forum|alt.badge.img+14
  • Scholar
  • June 6, 2017

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


Forum|alt.badge.img+3
  • Author
  • Novice
  • June 6, 2017

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


Forum|alt.badge.img+14
  • Scholar
  • June 6, 2017

have you noticed my formula at the top?

it should work on older form version as well.


Forum|alt.badge.img+3
  • Author
  • Novice
  • June 6, 2017

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


Forum|alt.badge.img+14
  • Scholar
  • June 6, 2017

great!