Is it possible to filter choices in a multiple choice list based on a previous questions result

For example I have two multiple choice question lists below. Is it possible to filter the choice options of the second multiple choice list based on whats selected in the first? I was hoping that the actual choice option would have a display condition, but it doesnt seem to have it.

Multiple Choice List 1
Male
Female

Multiple Choice List 2
Had HIV test
Is pregnant
Is using ARV's

Now in this scenario above if male is selected in the first list, it would be great if I could hide the option of "Is pregnant" in the second list. Obviously a male cant be pregnant.
Is this possible at all?

Calvin,

In your example above, the easiest approach would probably be to make two versions of "Multiple Choice List 2" - one for male, one for female, and set display conditions so only one is presented to the user. You can then use a hidden value to coalesce() the results into one question you can use later in the form and in exports.

Alternatively, you could build this logic into the multiple choice question's validation conditions. The user would still see "Is pregnant" for males, but would at least get an error if they tried to select it. The user experience isn't as good with this approach, of course.

Lastly, you could convert this from a single multiple choice question to a series of yes/no questions, which would allow you to put a display condition on each choice individually.

  • Ethan

Hey Calvin,

You can surely use look up tables.

Just a quick one on what you need to do.

Under the data tab in CommCare, select "manage tables", create a new table and then download it.

The table will have two sheets, one with a types sheet and the second sheet will bear the choices that you want.

I have my table named "trial_1" with "gender" and "next_qn" as seen below,
image

in the 2nd sheet, I have my table name "tria_1" with the following,
image

I have saved it and updated my trial_1 table in CommCare.

You will now set the questions as below, mind the filter options, if the gender selected in qn 1 above matches the gender that I have in my lookup table then display the next qn.

It will show the following if a male is chosen,

And show this if a female is chosen

And that's it just like that.

Regards,
Samuel.

Thanks so much for the feedback here guys. Super appreciate it! My apologies for the late response, I had some work that took higher priority which I had to finish up before I could come back to this.

Both these solutions could of worked for me, however I found using the lookup table gave the client exactly what they requested so went that route. For future questions I will definitely make use of both examples so they are both of great help to me. Thanks again!