Automate a question response based on answers from a previous questions

Hi everyone

I have a question, and I'm using Open Data Kit XLS form

I'm setting a form to assess participant eligibility based on the responses of three questions for a follow-up at two different sites:

Q1. Participant older than 18? Responses: yes/no
Q2. Participant school-level education? Responses: None/Primary/Secondary
Q3. Participant country of residence? Responses: Mozambique/Tanzania/South Africa

I want to Q4 to be a read_only and provide the following options if a set of statements are met:

Q4. Is the participant eligible and if yes to which site?
Response 1: Eligible to Mozambique (if (Q1 = 'yes' and Q2 = 'Primary' or 'Secondary' and Q3 = 'Mozambique'))
Response 2: Eligible to South Africa (if (Q1 = 'yes' and Q2 = 'Primary' or 'Secondary' and Q3 = 'South Africa'))
Response 3: Not eligible (if (Response 1 or Response 2 = FALSE))

Sorry for not having a script, not sure how to code the if() statements

Welcome to the ODK forum, @Adilson_Bauhofer! We're glad you're here. When you get a chance, please introduce yourself on this forum thread. I'd also encourage you to add an image as your avatar because it helps build community!

I would use a calculate type question to determine if the person is eligible, and then use the results of that calculation to show the correct note about their eligibility.

Here's an example: bauhofer_example.xlsx (10.1 KB)

1 Like