Loops

Is there a way to create loops through previous questions?

For example: for the following question question 7.8, if the answer is yes, go back to question 7.4 and answer 7.4-7.8 until a no comes up. Then go on to 7.9

7.4…

7.5…

7.6…

7.7…

7.8 Is there any more pizza in the box?

1 = Yes

2 = No

7.9. …

You can achieve this by creating a repeat group. This is a beta feature in KoBoForm, but it will work perfectly for your purpose. I’m attaching an XML file that you can use to see how it works in KoBoForm. Below is a screenshot of this form.

To create a repeat group you need to know that each question that is created after the repeat will be a child question, i.e. they will all repeat together. As you don’t want all your questions to repeat, make sure you first create the not-to-be repeated questions that follow the repeat group.

The way this was created:

  1. Create the ‘For each pizza…’ question as a text question (can be any question type though)

  2. Create question 7.9 as the next not-to-be repeated question

  3. Click on the first question and in the right dialog choose Question Type: Repeat

  4. Now add your questions 7.4-7.7, which will appear indented

Now, an interviewer is able to continue cycling through these 4 repeating questions until they choose to end the repeat.

It’s a beta feature because theoretically you can add repeats inside other repeats, which would break the form.

Inline image 1

simple_repeat_kobo.xml (1.74 KB)

···


Tino Kreutzer

Program Manager
KoBoToolbox | Harvard Humanitarian Initiative

Tel +1 416 879 3667 | Skype tinokreutzer
tino.k...@kobotoolbox.org

On Mon, Mar 17, 2014 at 8:40 PM, rsklar mail4...@gmail.com wrote:

Is there a way to create loops through previous questions?

For example: for the following question question 7.8, if the answer is yes, go back to question 7.4 and answer 7.4-7.8 until a no comes up. Then go on to 7.9

7.4…

7.5…

7.6…

7.7…

7.8 Is there any more pizza in the box?

1 = Yes

2 = No

7.9. …

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at http://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.