Multiple choice question with restricted selection options

Hello everyone,
I am facing a small problem:
In a multiple select question I have the following options:

  1. a
  2. b
  3. c
  4. A
  5. B
  6. C
  7. D

Here, if anyone chooses 1 or/and 2 or/and 3, the enumerator cannot choose any of the other options for selection. And similarly, if anyone chooses among (one or more) options 4 to 7, s/he will not be allowed to choose any of the options 1 to 3.

I am using xlsx form design to develop XML.
Thanks in advance if anyone has the solution.

Hello @shahadat.h9n ,

In the constraint header write an if condition
if((selected 1 or selected 2 or selected 3) and (selected 4 or 5 or 6 or 7),"You cannot select both capital and non capital "," ")
I hope this helps , if you find a better solution please let me know .

Thanks and Regards,
SGSC

1 Like

Hi @SGSC,

Thanks for your suggestion.
We tried your suggestion but were not able to make it work. Please see the attached xlsform (test_constraint_n) where we tried to replicate your suggestion. We could have written the if condition incorrectly.

I'm also attaching another xlsform (test_constraint_y) with our solution (which works). However, the issue is that our choice list is actually 130 options long, where the first three cannot be selected with any of the remaining 127. Our solution is very tedious since we would have to write an argument for all 130 options. What we would prefer is if there is an option to create a loop for options 4-130 so that it reduces writing 127 options with just one.

test_constraint_y.xlsx (13.4 KB)
test_constraint_n.xlsx (13.4 KB)

2 Likes