Set numeric text entry validation in a multiple choice single answer question | XM Community
Solved

Set numeric text entry validation in a multiple choice single answer question

  • 3 October 2019
  • 3 replies
  • 40 views

Badge
I have a question asking about years of nursing practice. It's a single select question and only the first option allows a numeric entry. I have set force response if first option is selected. That works. I also wanted to set validation for the numeric entry so that it's above 0 and below 30. However, once I set the validation using custom validation, the numeric entry is required no matter which option is selected (when I select not sure, it still popped up a error message asking me to fill the box with a number between 0 and 30.

How do I set a validation which applies only one the first options is selected?

!
icon

Best answer by Akdashboard 3 October 2019, 20:49

View original

3 replies

Userlevel 7
Badge +6
You need to add OR statements to your validation logic. Something like IF "Etner years of practice, text entry is greater than 0 or less than 30 OR Not sure is selected OR never practices..."
Badge
Awesome. Problem solved. Could I ask one more thing here? How can I set a rule so the numeric entry can have max one decimal?
Userlevel 7
Badge +6
I think this can be done with a match regex function, but I am not certain.

Leave a Reply