Skip to main content
Nintex Community Menu Bar

Multiple Choice field validation

  • February 23, 2018
  • 5 replies
  • 34 views

Forum|alt.badge.img+7

I have a choice field (Incentives) that is formatted as a multi select checkbox. If the user includes T-shirt in their one or more selections, then I want to require a selection for T-shirt Size. I am not sure how to word the validation rule on the Size field to accomplish this. The syntax I have works if you have only the T-shirt option selected and I'm not sure how to revise it to say "if T-shirt is included in the one or more choices, then require the Size".

Incorrect/incomplete rule on Size field: {Self} == "" && IncentiveOptions == "T-shirt"

213587_pastedImage_1.png

5 replies

Pyae
Forum|alt.badge.img+5
  • Scholar
  • February 25, 2018

Hi Mindy,

You can use the formula like this. Means if your choice contain the value "T-Shirt" and the Shirt Size value is empty, the validation will trigger. You can disable the control of Shirt Size control if the choice does not contain "T-Shirt", so user won't select any value in there until they select "T-Shirt". I put and trigger the formula on the Save button.

=and(isNullOrEmpty(TShirtSize),contains(Choice,"T-Shirt"))

Please let me know if it work for you. happy.png


Forum|alt.badge.img+7
  • Author
  • Rookie
  • February 25, 2018

Thank you!!!!


Forum|alt.badge.img+7
  • Author
  • Rookie
  • March 1, 2018

Here is the syntax I put on the validation rule for the t-shirt size choice field:  

Nintex Forms Designer - MASH Donation - Item

isNullOrEmpty(TshirtSize) && contains(IncentiveOptions,"T-shirt")

Forum|alt.badge.img+5
  • March 7, 2019

I too had to write the validation string like mindymac03 instead of the way marked as the answer for it to work.


Forum|alt.badge.img+1

what if I wanted it required when it does not equal 1 of the 5 choices i have?

 

and(isNullOrEmpty({Self}),not(contains(TypeofRequest, "test 5"))
 
This does not seem to work when I try to make a field "Seeded/Seedless" required, only if the TypeofRequest is test 1-4 but not when it's test 5. Any suggestions?
 
Test 1= Apples
Test 2 = Bananas
Test 3 = Strawberries
Test 4 = Grapes
Test 5 = Papaya