Simple loop in qualtrics | XM Community
Question

Simple loop in qualtrics


Badge
Hi all,

I've got a situation where a participant sees one of 2 products on a page, and can either 'purchase' it or 'shop around'. If they 'shop around' they see another page with product 2, but can 'go back' and see product 1 again. They then have the option to 'purchase' or 'go back' to see product 2 again. I want them to be able to view product 1 and 2 as many times as possible before they make a purchase decision, which should 'break' them out the loop and the survey continues. We're not updating any information as it loops, just want the participant to be able to 'jump' to the product they want to look at within the loop.

I've tried to set this up using loop and merge but can't seem to get it to work. Unfortunately just using the back and forward buttons won't work in our case (there are actually conditions with more than 2 products).

Any help would be gratefully received!

8 replies

Userlevel 7
Badge +11
I don't know how many conditions you have, but you could accomplish this with branch logic. It could get cumbersome because you'd have to build 1 branch for each path, but it's possible!
Badge
Thanks Jen, I tried using branch logic but indeed it does get cumbersome and seems as there would need to be a definite end for each possible path of comparison. Our participants should basically be able to compare 4 different products (each on a separate page/block/question).
Userlevel 7
Badge +11
@cjohnburke Yes, I can imagine it'd get messy, quick. Maybe someone else can help with a different solution.
Userlevel 7
Badge +27
@cjohnburke,

I would consider including "View product X again" tooltip links on same page as your purchase question.
Badge
Hi Tom,
thanks for the suggestion. Is there a way to direct participants to a specific question or block based on an answer sing javascript at the end of the question?
Userlevel 7
Badge +27
> @cjohnburke said:
> Hi Tom,
> thanks for the suggestion. Is there a way to direct participants to a specific question or block based on an answer sing javascript at the end of the question?

No, not directly. You can use JS to set an embedded data field then base display logic or branch logic on that field.
Badge
> @TomG said:
> > @cjohnburke said:
> > Hi Tom,
> > thanks for the suggestion. Is there a way to direct participants to a specific question or block based on an answer sing javascript at the end of the question?
>
> No, not directly. You can use JS to set an embedded data field then base display logic or branch logic on that field.

Thank you Tom, is there a way to set an embedded data field as the response to a multiple choice question? I have a lot of questions so would prefer to not use the hard-coded QR-QID21-4 type route but a this.QuestionID type javascript. Would it go in the "page unload" section of the JS editor?
Userlevel 7
Badge +27
> @cjohnburke said:
> Thank you Tom, is there a way to set an embedded data field as the response to a multiple choice question?
Yes, although it is rarely necessary. You can perform display/branch logic on or pipe the answer directly from the question. However, to get the selected choice(s) use:
`this.getSelectedChoices()`
> I have a lot of questions so would prefer to not use the hard-coded QR-QID21-4 type route but a this.QuestionID type javascript.
It is `this.questionId` (case sensitive)
> Would it go in the "page unload" section of the JS editor?
No, use the `addOnPageSubmit` function.

Leave a Reply