Select to view content in your preferred language

Select multiple query - anchoring and exclusive options

618
3
09-14-2023 06:47 PM
GarethHeta
New Contributor

Hello, I am working with Survey123 Connect, and I have a query about multiple select functions.

When I randomize the list of choices, is there a way to prevent some of the choices from being randomized and instead always retain the same order? For example, if I have the option "none of the above" I want this option to always display at the bottom of the choice list.

Also, I want this option to be exclusive, so if it is selected, any other option previously selected becomes deselected (or if they chose this option first, the rest of the choices become unable to be selected).

Thanks!

0 Kudos
3 Replies
DougBrowning
MVP Esteemed Contributor

Not sure on the order thing but on the "none of the above" one there is no way to uncheck boxes that I have ever seen.  That is simulating a user click and not something 123 can do.  If anyone has seen it I would love to know.

I have a form similar to this and the best I could get was to set a constraint so that if the user picks none of the above then no other options can be filled in.

The constraint looks like this

if(selected(., "none of the above"), count-selected(.)=1,1)

Hope that helps a little.

0 Kudos
abureaux
MVP Frequent Contributor

Can confirm I also no of no way to deselect items based on a selection.

However, you can use calculates within the survey and IF statements in a Feature Report to simulate this behaviour. Really depends on your end goals. For instance, if they select "None of the above" you could do something like...

App:

IF(selected(${question1},'none_above'),'None of the above.','')

This could be dynamically displayed in place of the normal list when None of the above is selected.

Feature Report:

In app:

if(selected(${question1},'none_above','yep','nope')

In Report:

${if question1_none=='nope'}${question1}${/}${if question1_none=='yep'}None of the above.${/}

 

Another option is a little more restrictive. You can force the end user to deselect the extra items on their own. I have done this for lists where I had to use some items as "headers" (see below).

abureaux_0-1694788889128.png

I can't really have users selecting the headers. And while I do have a warning, even if I made it glowing neon and ten times larger font, users still ignore it:

abureaux_1-1694788949088.png

I did it via a calculate, and a constraint on the select_multiple.

Separate calculate:

if((selected(${nm_selection},'nm_inj') or selected(${nm_selection},'nm_ill') or selected(${nm_selection},'nm_dmg')),1,0)

Select_Multiple constraint:

${nm_selection_calc}=0
0 Kudos
GarethHeta
New Contributor

Thanks so much for your assistance!

0 Kudos