hi community. is there a way to reference answers from text question types as your choices to your select_multiple question (please refer to the screenshots of attempts below). also, i want to limit the number of choices to appear depending on how many text questions will be answered
Hello @hm11,
With your coding/naming system, you might try:
- Create a calculate variable, calculating the number of non-empty text questions.
- And then use this as a choice_filter (column) against name: name <= ${NoOfTextanswers}.
Precondition is: The initial other text questions are sequentiell. So, e.g. other3 will not happen without other1 and other2.
With the (famous) search option of this forum you find more examples and previous discussion for your topic, e.g.
-
https://community.kobotoolbox.org/t/using-text-responses-in-previous-questions-as-options-other-question/6986/2.
This solution with a choice_filter based on empty labels will even work without the precondition noted above.
Also, pay attention, there is a problem with the
choice label reference in Enketo when combined with a choice_filter (see forum posts). But, as far as I know, it is OK in Collect.
- https://community.kobotoolbox.org/t/dynamic-choice-label-with-choice-filter-update-problem-in-enketo-kobo/15986
- https://community.kobotoolbox.org/t/displaying-a-required-list-of-dynamic-choices-in-a-select-multiple-question-based-on-the-number-of-text-response-used-within-a-repeat-group/13357/8
- https://community.kobotoolbox.org/t/displaying-others-specify-label-in-the-next-question/6077
thank you so much @wroos . it works!
Hello @hm11,
Fine!
Maybe you could share the related part of your form with the final solution here, please. As an example for the community.
sure. here’s a screenshot of what worked for me. for the choices sheet, it is the same as before
thank you again @wroos
hi @wroos , it seems this approach is not working consistently. I am testing it now using the same platform that I used earlier (ODK xlsform validator) and the choices are not appearing as before
here’s a the screenshot of how it worked before
for your assistance please
Hi hm11,
Could you please provide me the xlsform for solved on this issue “Choices from Previous Text Questions”… I am also searching resolution for this problem, if you can support me It would be grate and I will happy.
With Regards,
Ramesh
sorry dear I also have
somehow the same problem but a bit different.
I want to use from choice filter for the follow up question. it works but for the previous question I have an ‘other’ choice as well and when the choices is filtered for the follow up question it bring the ‘other’ itself but I want to have the text which entered for the other text box come as a choice for the follow up question. if anyone could help me would be greatly appreciated. thanks