Looping Over Multiple Blocks with Branches | XM Community
Solved

Looping Over Multiple Blocks with Branches


Badge +5
Hi.

I have a created survey (actually quite simple). There is one question that I'm calling the anchor question that looks something like this?

Where did you go next?
a. home
b. school
c. store
d. library
e. I went nowhere else today.

Basically, each answer solution a-d triggers custom questions about that specific location (that I have in the survey flow). Choice e is basically the escape character. It is unknown how many places a person went in a day. It is also possible that the person went to the store multiple times that day. Each response a-d has its own block with the questions specific that that answer. I would like to loop over this question and the response-specific questions until choice e is selected. Anyone know how to do this simply?

Thank you!
icon

Best answer by Anonymous 20 April 2019, 06:56

View original

11 replies

Userlevel 4
Badge +5
Hi @KLBoles
You have to decide the number of loops you want to keep for each block as you cant keep a infinite loop.
After each selection you can ask a question like - How many times have you visited ....?
If you want to keep the loop for max 5 times then you can keep predefined answer options like, Once, Twice .... More than 5 times
Based on the answer of this question you can loop the relevant block.
Badge +5
Right. I understand that you would normally loop for a set number of times. However, in my case, this value should be user defined. This is why I am using response "e" as a sort of escape character/break. Thoughts on how to do this in Qualtrics?
Badge +5
Note: We can set some max i (~15), but responders would need to be able to break out of that loop before 15.
> @KLBoles said:
> Note: We can set some max i (~15), but responders would need to be able to break out of that loop before 15.

Please follow this resource
Badge +5
I have read all through the loop/merge resource. It doesn't all me to do what I am trying to accomplish.
Userlevel 4
Badge +5
As you are saying the number is user defined(max ~15), are you asking a question like after selecting each option - How many times have you visited ....?
So If anyone selects Shop, then it will ask - How many times have you visited shop?
Badge +5
Hi.
No. Not quite. Let me be a bit clearer.

The loop starts with the anchor question:

Where did you go next?
a. home
b. school
c. store
d. library
e. I went nowhere else today.

If (b) school is chosen, they receive follow-up questions like:

b.1 What courses did you have in school today?
b.2 What did you learn today?

When those questions are completed, they need to go back to the anchor question:

Where did you go next?
a. home
b. school
c. store
d. library
e. I went nowhere else today.

This time, they might choose (c) store. They would receive follow-up questions like:

c.1 What store did you visit?
c.2 What did you purchase?

Then again return to the anchor question:

Where did you go next?
a. home
b. school
c. store
d. library
e. I went nowhere else today.

I would be comfortable with assuming they only went 15 (max i) places during the whole day... that is we would - at max - need to return to the anchor question 14 times. However, lots of people will not have visited 15 places in the day, so when they choose choice (e) "I went nowhere else today" it needs to act like an escape character - never again returning to the anchor question.

I hope that makes more sense. Thank you for trying to help me!
> @KLBoles said:
> Hi.
> No. Not quite. Let me be a bit clearer.
>
> The loop starts with the anchor question:
>
> Where did you go next?
> a. home
> b. school
> c. store
> d. library
> e. I went nowhere else today.
>
> If (b) school is chosen, they receive follow-up questions like:
>
> b.1 What courses did you have in school today?
> b.2 What did you learn today?
>
> When those questions are completed, they need to go back to the anchor question:
>
> Where did you go next?
> a. home
> b. school
> c. store
> d. library
> e. I went nowhere else today.
>
> This time, they might choose (c) store. They would receive follow-up questions like:
>
> c.1 What store did you visit?
> c.2 What did you purchase?
>
> Then again return to the anchor question:
>
> Where did you go next?
> a. home
> b. school
> c. store
> d. library
> e. I went nowhere else today.
>
> I would be comfortable with assuming they only went 15 (max i) places during the whole day... that is we would - at max - need to return to the anchor question 14 times. However, lots of people will not have visited 15 places in the day, so when they choose choice (e) "I went nowhere else today" it needs to act like an escape character - never again returning to the anchor question.
>
> I hope that makes more sense. Thank you for trying to help me!
>

Please see this preview survey and is this how you want ?
Badge +5
Yesssss!!! This is it! How did you do it? Thank you SO much!
> @Shashi said:
>
> Please see this preview survey and is this how you want ?

Hello !

I am very interested in this, could you describe the process ?
I read the document you attached in your other comment but couldn't replicate what you did in this preview (and the preview is exactly what I need).

Thank you !
Userlevel 2
Badge +6

LauraTem did you ever get a copy of the survey? If I click on the Preview Survey links, it says Sorry, unavailable. I am trying to set up a similar type of looping (though I know only 4 times through) and am curious if/how you accomplished this in the survey flow. Thanks!

Leave a Reply