Multichoice question - checkbox - display conditions

I used a checkbox question in a registration form in module 1 to answer the type of a risk factor according to the image below:

image

''outro'' means ''other'', '' especifica outro factor de risco '' means specify other risk factor''
What I want is to display the selected answers in the question above in a follow up form in module 2. Any hints on how I can do this are welcome.

Thanks in advance

Hi Ferdinand,

You can save a multiselect question to a case. The result will be the selected choice values combined into a string separated with spaces. There are a few "Multi-Select Helper Functions" you can use for instance to check whether a particular answer was selected. Since the value of "especifica outro factor de risco" is a free text entry, I'd store that as a separate case property.

In your followup form, you'll probably want to map those choice values back to the display text. This is a bit more complex, but still possible. If you'd like to handle each selection individually, then you could make a group for each risk factor, where the display condition is for instance:
selected(#case/fatores_de_risco, 'falta_de_apoio_familiar').

Another option would be to use the replace() function a number of times to substitute the display text for the choice values, though you should be certain that no choice values are inadvertently contained in display text. Finally, a lookup table would likely be a good approach here, since it'll store that mapping, though that's more of a heavy-handed solution.

  • Ethan

Hi, Etan,
Your suggestion to handle each selection individually is good but I didn't understand the part below very well:
**If you’d like to handle each selection individually, then you could make a group for each risk factor, where the display condition is for instance:
selected(#case/fatores_de_risco, 'falta_de_apoio_familiar').

Do you mean that I have to put a multichoice checkbox question for each risk factor inside a group or a question list? The display condition is clear.

Hi,

The group option is definitely what I would suggest.

Groupe 1 with display condition set as selected(#case/fatores_de_risco, ‘falta_de_apoio_familiar’)

  • label saying : Falta de apoio familiar
  • add all things related to this choice

Groupe 2 with display condition set as selected(#case/fatores_de_risco, ‘desempregado’)

  • label saying : Desempergado/falta de renda
  • add all things related to this choice

Groupe 3 with display condition set as selected(#case/fatores_de_risco, ‘transporte’)

  • label saying : Dificuldade para transporte(...)
  • add all things related to this choice

...etc

Groupe 10 with display condition set as selected(#case/fatores_de_risco, ‘outro’)

  • label displaying what is in "espicifica outro factor de risco"
  • add all things related to this choice

The groups here are indeed the "group" question type but you can also choose the question list if you want the label and all things related to the choices to be seen in 1 page.

-Michel

Hi, Michel. Iam happy with your explanation and I will use this approach in another workflow. In my current workflow there is no series of questions related to each choice, I just want to see the selected choices in the registration form in the follow up form. In this situation what do you suggest I should do?

Thanks in advance

Yes exactly. And place the display condition for each labels.

Question list

  • label 1 :
    • Falta de apoio familiar
    • display condition set as selected(#case/fatores_de_risco, ‘falta_de_apoio_familiar’)
  • label 2 :
    • Desempergado/falta de renda
    • display condition set as selected(#case/fatores_de_risco, ‘desempregado’)
      *label 3 :
    • Dificuldade para transporte(…)
    • display condition set as selected(#case/fatores_de_risco, ‘desempregado’)
  • ...
  • label 10 :
    • “espicifica outro factor de risco”
    • display condition set as selected(#case/fatores_de_risco, ‘outro’)

-Michel

Hi, Michel. My M& A officer has another issue saying that the selected choice values in the registration must appear as a checkbox in the follow up form where a chw can tick them. I have thought of using a question list with each risk factor as a checkbox question with a display condition. The example is as follows:
image

Does this approach make sense? if this approach is ok, how can treat the other option in the multiselect question as it is a free text?

I appreciate your help