Auto multiple select based on selections from previous questions

Hi,
I have few set of questions. Attaching sample xlsform. Where i have 3 questions where i want is selected answer in q4 to be directly selected or auto select in q7 and whatever selected in q4 and q7 should be directly selected orSelect Auto Checkbox.xls (66.5 KB) auto select in q8,

Hi @khasaab,

You could do the same as outlined in the instructions provided in the image below:

In the survey tab of the xlsform:
Image 1

In the choices tab of the xlsform:
Image 2

Data entry screen as seen in Enketo:

Reference xlsform:
Select Auto Checkbox.xls (61.5 KB)

Have a great day!

1 Like

Thanks it worked perfectly. Just want to add one query how can i validate it like if whatever coded in Q4 should be coded as Q7 and whatever coded in Q7 should be coded in Q8. Its in case that the user might by mistakenly removed the auto selected codes. Kindly note the user can select additional codes but cannot remove the selected codes.

Hi,
On this query,

You can add warning note that allows you to tell the user that they have not selected the option. I do this by adding a note question for every selection option and then adding a constraint to check for what you are asking for. See a sample for Q7 validated against Q4.

The behavior will be something like this when you select both

However when you fail to select in Q7 what was selected in Q4, this is what appears,

You can find a sample form here Select Auto Checkbox.xls (66.5 KB)

Stephane

1 Like

If Q4 responses were not selected in Q7 but I want to auto-select for both Q4 and Q7 in the responses in Q8, how can I do it?