I wish to use multiple constraints in a particular question. I want to collect ID card number for any 4 listed ID cards available to the respondents but each of the cards has different number of digits.
For example, one card is alphanumeric with 19 digits, another is number only with 11 digits. I want to ensure that the correct digits is inputted for any of the cards
I had used the options listed above, it isnβt working. It works for numbers only.
Specifically, I am working with 4 different cards with the following characteristics. Only one card can be selected, however, I want the specific constraints of each to apply when any of them is selected
ID Card - alphanumeric 19 digits
ID card 2 - alphanumeric with 9 digits
ID card 3 - alphanumeric with 12 digits
ID card 4 - numbers with 11 digits
Hello @Bilqis,
You can do this by using a (cascading) if clause in your constraint, based on the selected card type (preceding select_one question).
Like:
if( ${cardType} = β1β, regex β¦ A, if(${cardType} = β2β, regex β¦ B, if( β¦, regex β¦C. if(β¦, regex D, false()) ) ) )
(You might also use 4 different ID variables, filtered by relevant clause, based on the chosen type chosen.)