Multiple select, constraint, one answer then nothing else

Hi all,
I've looked through the threads on this topic carefully but they don't exactly cover my problem so posting here.

So I have a multiple select question (what other crops did you cultivate?). The answer option is long, but the first option is "no other crops". I would like to add a constraint that if you select this first option, then you cannot select any other.

I've tried this but it is not working:
(not(selected(.,'1')) and count-selected(.) >= 1) or (selected(.,'1') and count-selected(.) = 1)

the answer option list is super long, and the respondent can select as many of the other choices as needed, typing out a constraint that fits all combinations is too much (i.e. I would not like to use something like (not(selected(.,'1') and selected(.,'2')) or (not(selected(.,'1') and selected(.,'2') and selected(.,'3'))....the list goes on for 100 possibilities.

Unfortunately we cannot create an entry yes/no question either for unrelated reasons, though i know that'd be the fastest way.

Any colourful solutions? Many thanks.

Hi @Xue

why not just:

not(selected(.,'no_other')) or count-selected(.) = 1

am I missing something?

SelectMultiple-export.xlsx (8.0 KB)


Hi @Xue,
In addition to @Grzesiek2010, also
if( selected(., 'no_other'), count-selected(.) = 1, true() ) should work.
Instead of true() you could add here further restrictions, like max. 3 other ( count-selected(.) <= 3 )
Also, take care to put required to true.

@Grzesiek2010 @wroos
Many thanks both, yes that is a simple and beautiful solution....hadn't thought about it!
thanks again