Applying Constraint on Multiple select depending of previous field value

I am building an ODK tool using xlsForms; however, I have a requirement that has proven difficult to address.
How does one implement constraints depending on a previous field? e.g.

  1. Sex
    ☐ Male
    ☐ Female
    ☐ Unspecified
  2. Which priority population group(s) (Select all that apply)
    ☐ Adolescent girls (if female)
    ☐ Low SES
    ☐ Vulnerable women (if female)
    ☐ Long-distance truck drivers
    ☐ Migrant workers
    ☐ Pregnant women (if female)
    ☐ Other: (Specify: ________________)

If the choice in Q1 is male; it restricts "if female" choices. Kindly advise how best to implement the solution.

Thank you!.

Thank you!

1 Like

Dear @Samuel_Kamiru,

what you are looking for is "Filtering options in select questions".
Please look at the link, where you can find examples of how to implement it.

Best,
Aurelio

@aurdipas Thank you for the feedback. The challenge with the solution you provided would work in one direction; however, there are options/choices that are applicable for both Males and females. i,e. The ones that are not indicated if females

you can use OR on the choice filter.

See the extended example

Jobcategories.xlsx (11.6 KB)

@aurdipas Thank you very much. The solution works!