Specify Other when Other is selected with other choices in a select multiple form

Hello,
I would like to be able to have a specify other text prompt/question follow after a select multiple question, in which many choices are selected including the "other" option. I currently have the following in my XLSform:

Type Name label:: portugese Label::english Constraint
text B14_other Especifique outro Specify other ${B14} = 96

Where the previous question(question B14) is a select multiple question with other (aka 96) coded as an answer choice. This does not allow me to type in and specify what other means after I have selected it as part of my select multiple choices in the previous question. This method does work for select_one type questions. Is there a different method to use for select_multiple type questions?

Any help or ideas on how to do this in an XLSform would be greatly appreciated.

Cheers,
Sarah

Check out this @Sarah_Pfeil select.xlsx (6.1 KB)

Regards,
Grzegorz

2 Likes

Hi Gregorz,
Thank you for the recommendation. This did not work for me. I am still having the same problem where i can not specify other using text when other is selected as part of a select multiple answer choice. Do you have any other ideas? Thank you for your time and help.
Best,
Sarah

So I think I don't understand your case. I thought you need to display an extra question (text box) when one of selected options in previous question (multi select) is "other". Am I wrong? You can also attach your form maybe I missed something.

Yes, that is my problem. To clarify, if a person only selects other in response to a select multiple question then it will display an extra question (text box) to specify what they mean by other. However, if they pick many choices in the multi select question as well as picking the other option choice, then the extra question (text box) for them to specify what they mean by other is not displayed.

I have attached my form here and have changed the text to red for the 3 questions that have this problem in my form. Any suggestions would be very appreciate. I have no idea what I am missing and am very new to this/ not a programmer.

thank you!
Sarah

Now I see, so try this: select.xlsx (6.2 KB)

Wouldn't this only allow the text box to be visible if the person selected other and no other answer choices? That is what currently happens.
I would like them to be able to select many answers in addition to selecting other. For example they choose A and C and Other and then the next question is a text box to type in the other. Im pretty lost.

I think I don't understand again :slight_smile: The first form displays an additional question if you select other or other + something else.
The second form displays that question if you select only other option. What's wrong?

Which case do you need?

I need the first case. I tried what you suggested but for some reason it is not working for me. :frowning: Maybe I am doing something wrong with using the first case.

Ok so pleas attach your form (you said it's attached but I can't see) and I try to look at it.

CFAR_HIV_Survey_ODK_form_v2.6.xls (92.5 KB)

Thank you for taking a look at my form. I really appreciate it.

I'm not able to covert your form using http://opendatakit.org/xiframe/ but you should add selected(${B14},'96') instead of ${B14} = 96 in L51 and it should work. Did you try it?

Ok thank you! I will try it again.

Hi Sarah,

Try this syntax...

under "type" enter "select_multiple B14 or_other" and under "name" enter "B14".

This should allow you select chosen options alongside other and the text variable will open for you to type in.

Best regards,
Chinedu.

1 Like

@Chinedu_Arinze is exactly correct, but I wanted to add a clarifier for @Sarah_Pfeil because the or_other construct does have limitations if you need to support multiple languages or code other as a different value.

In this example below, favorite_colors uses the or_other construct, while favorite_numbers does this manually using relevance.

image

t9062.xlsx (11.0 KB)

You'll note that favorite_numbers question lets you specify the wording of the other question, the label of the option in whatever language, and what value/name is saved to the database (e.g., -1). You can also specify whatever data type you want. For example, you can have an other that is a GPS coordinate or a picture.

One limitation you should be aware of is that you cannot put favorite_numbers and other_number on the same screen (e.g., in a group with a field-list). They have to appear on different screens.

2 Likes

8 posts were split to a new topic: If user selects "none" in multiple select, prevent selection of other options

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

The or_other is an interesting option that I overlooked, but upon testing it, I realized that the value is stored in yet another column. Is there a way to store the "other" value in the same column as the original question? Cause after all, it's an answer to the same question.

P.S. Please let me know if this should go into a new question.

Hi @techGus,

There is no way to acheve that in the ODK platform. You can join those those two column in any stastistical software you use.

Regards

Dickson

As @dicksonsamwel indicates, no there is no way to get the 'other' value added into the original select_multi result. But what you could do is add a calculation that appends the 'other' question's (string) value to the select_multi's (string) value, and use that result everywhere instead of the select_multi. eg

if(${other}='', ${select}, concat(${select},' ',${other}))

note, the ' ' (space) delimiter is critical.

FYI: the proper (and only) way to do what you want is to have Collect (& Enketa, et al) support open selections, discussed here.

1 Like