Distinguish 0 v/s 'Not Applicable' choice in slider | XM Community
Solved

Distinguish 0 v/s 'Not Applicable' choice in slider

  • 26 March 2019
  • 5 replies
  • 81 views

I have a slider with numeric choices from 0 to 4 in the increment of 0.5. I also have 'Not Applicable' option turned on.
In the very next question I have custom validation.
User must provide comments if user selected value in slider is less than 1 or Greater then 3.
No validation is required if user selects 'Not Applicable'

However it seems my validation is failing when user selects 'Not Applicable' since the choice value is coming up as zero.

How to distinguish user selected 0 value v/s 'Not Applicable' selection in Slider ?

I am trying to avoid Java Scripts.
icon

Best answer by TomG 27 March 2019, 14:34

View original

5 replies

Userlevel 7
Badge +19
Is there are reason you need it to be a slider?
1) "Not applicable" on a slider is really confusing for participants; they are most frequently used when the only options are on one full spectrum, not for options that have separate categories.
2) This logic should be very simpler utilizing a regular multiple choice question and recode values.
Slider will not let you re-code "Not Applicable" into a new value, or allow you to "exclude from analysis" due to the conventions mentioned in my first point.
Userlevel 7
Badge +27
@Amar,

Not Applicable results in a empty value. So, I think you should turn on force response on your slider and the validation should be something like:

If comment not empty
OR (new logic set)
If slider is empty
OR slider >= 1
AND slider <=3
Kate & TomG,
Thanks for your feedback.
I am using slider because some of our users thought it is mobile friendly. I am exploring other options as well.

TomG,
I did used 'Not Empty' check in my validation and it seems to work.

By any chance you will know how I can do similar validation in Java Script ?
I have not used Java script yet but will like to give it a try. It seems Java script open up lot more possibilities.

Thanks in advance for your help.

Amar
Userlevel 7
Badge +27
> @Amar said:
> By any chance you will know how I can do similar validation in Java Script ?
> I have not used Java script yet but will like to give it a try. It seems Java script open up lot more possibilities.
You can do a lot of things with JavaScript, but it isn't well suited to doing validation in this specific case. You are better off using custom validation.
In the 2nd question, I want to set some Embedded Data values based on user selection in the previous question. It may will help in another part of the survey as well as generating dynamic messages. Java script may help.
How can I access previous question information and user selection using Question ID.
Previous Question must be displayed on the same page in order to do that ?

Leave a Reply