Hi everyone, I am trying to set a constraint on two responses of a second question following the first.
Q1 asks: Is the beneficiary who this survey relates to a male or female? Q1 has two possible responses: male or female.
The second question asks: Who is the survey being applied to? Q2 has two possible responses: Beneficiary or Beneficiary Family Member.
The constraint is for Q2: if the survey relates to a male beneficiary, the respondent must be a beneficiary’s family member. If the survey relates to female beneficiary, the respondent must be the beneficiary themselves. I am trying to constrain the answers such that “Beneficiary” response for Q2 can only be selected if “female” was the response for Q1 and “Beneficiary family member” response for Q2 can only be selected if “male” was the response for Q1. Is there a way to do this?
Thank you for the quick response. It does not pull up any constraint
Is there a way to set this up as two separate conditional questions? For example:
Q1. What is the gender of the beneficiary?
Q2. (Relevant: if male) who is the survey being applied to? With a constraint then if the enumerator selects “beneficiary”?
Just so that you know - the image you showed matches the constraint well, so there should be no error message shown. Kobo is working as expected.
If you want an error message shown when ‘male’ and ‘beneficiary’ are both selected - your constraint needs to be the other way around, like:
(${gender}=male and .=beneficiary_family_member) or (${gender}=female and .=beneficiary)