Automatic selection in select_one


I want my ‘select one’ question with only a single option to be automatically elected. I’ve searched for various ‘auto-selection based on previous answers’ solutions, but I cannot use those solutions as my issue is simply about having a default selection, regardless of the answers given in previous questions. I can attach XML if you need it.

I kindly seek community’s advice. Thank you.

Welcome to the community, @seungwoo! Maybe you should be able to do it as outlined in the post discussed previously:

Thanks. @Kal_Lam But it also came back with the same questions that @thierrylairez left. The “default” works only when I know the name of the default choice, but my choice is dynamic, linked with cascading selections. Do you have any other solution to systemically select the first option as a default?

@seungwoo, maybe you will need to provide more details on this so that the community should also be able to help you out.

@Kal_Lam Kindly see this screenshot and xml file. I want the last question to be selected automatically when previous three cascading questions are answered. The target number in the last question that needs to be selected automatically is dynamic depending on the answers to previous questions. Thanks.

shared_Kobo_community.xlsx (13.9 KB)

@seungwoo, if this is your requirement, why don’t you go with the cascading select questions as outlined in this support article Adding Cascading Select Questions.

@Kal_Lam It is constructed with cascading select questions and I just want the single option in the last question to be selected automatically without enumerators ticking it. The reason I am doing it is because I couldn’t find a way to show the target numbers associated with each selected school in ‘note’ (or any other format) without using IF statement.

Welcome @seungwoo ,
Design hint: It seems that you want to map a 3 level cascading choice to a code. (The same code can apply to more than one choice.)

Perhaps, you could do this by adding a new code column to the cascading choice, deepest level, and using a search() function or an XPath expression (instance …/code) to get the code for the choice (from the choice list). The search option of this forum can provide examples.
You can then show this code value in a note.

Hint: Always check your form with the Online validator during development and before deployment. It will give you a duplicate choice warning for your current form.

1 Like

@seungwoo, do did you mean you wanted this to be automatically selected?


@Kal_Lam Apologize for the last response. Yes, I just wanted that to be selected automatically when it pops up. Thanks.

@seungwoo, my question would be, if you already know the value by default, why keep an extra question (to be filled automatically)?

Else, if you still wish to prefill, you could do it as outlined in this post discussed previously:

1 Like