Hi,
I would like to set a condition (relevance) based on the answer from the “selected” position in a repeated group.
I am designing a household survey that does the following.
(1) Collect household members’ names and roles (e.g., head, spouse, etc.) using “repeat”
(2) After the repeat ends, choose one name from the names entered in (1)
(3) Show a question ONLY IF the role of the selected name is NOT head.
I can do (1) and (2), but not sure how to do (3).
Suppose there are 3 members in the household as below.
- John Doe, head
- Mary Doe, spouse
- James Doe, child
Once I collect the information above using “repeat”, I ask who the respondent is
Q1. Select your name
- John Doe
- Marry Doe
- James Doe
Then we ask Q2 ONLY IF John Doe (head) is NOT selected.
Q2. Met the household head yesterday?
- Yes
- No
Here’s how I programmed so far, but not sure what to write in “relevant” column in “select_one yesnow” row.
+------+-----------+------------+------------+
| type | name | label | relevant |
+------+-----------+------------+------------+
| begin_repeat | HH_roster | Household roster | |
| text | name| Name | |
| select_one role | role| Role in household | |
| end_repeat | HH_roster | Household roster | |
| select_one ${name} | name_resp | Select your name | |
| select_one yesno | meet_head | Met the household head yesterday? | |
+------+-----------+------------+
And “choices” sheet.
+------+-----------+------------+
| list_name | name | label |
+------+-----------+------------+
| role| head | Household head |
| role | spouse | Spouse |
| role | child| Child |
| role | other | Other |
| yesno| yes | Yes |
| yesno | no | No |
+------+-----------+------------+
How should I do (3)?
Any suggestions are appreciated.