How to skip to the next section after 4 consecutive negative answers

Hi,

I am struggling with the design of a questionnaire. There is a series of yes/no questions, divided in two different sections (around 20 questions per each section). I would like to obtain that if the respondent answers four times in a row "no" (at any point during the 20 questions), the questionnaire skips directly to the next section. Any idea on how to do this?

Thank you so much in advance for your time,
Agnese

Hi @Agnese_I
Welcome to the ODK forum. 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 a picture as your avatar because it helps build community!

There is no easy way to achieve what you described. Skipping questions is possible by making them relevant or not. If you want to skip multiple questions the easiest way would be to put them into one group and the use relevant column as well (see https://xlsform.org/en/#skipping).

In you case you would need to add multiple groups like that to support all possible cases where after four no answers the rest of questions is skipped.

You can try but even if you are able to do that it's going to make your form very complex with multiple nested groups.

This is not elegant by any means, but I hit loop issues trying to set relevance based on the concatenated string of all section one answers, so instead the relevance is created from an XL formula and adds an extra question to it each time, as the start cell in the range is fixed but the end isn't, so you can copy-paste/drag it down.

This builds the relevance check for the 5th question (row 11), dragging it down will change it to B8:B11 for row 12 etc.

="if(contains(concat(${"&TEXTJOIN("}, ${",TRUE,$B$7:B10)&"}),'NNNN'),'','yes')"

If you answer NNN, skip a question and then answer N, it will also suppress the remaining questions, to prevent this I've also suppressed the later questions until the prior are answered in section 1, and section two does the basic suppress after NNNN. Or you could not use field-list and make them mandatory.

skiptest.xlsx (24.1 KB)