How to exit loop & merge after all questions answered correctly? | XM Community
Skip to main content

I’m building an experiment for my dissertation and am hitting a major roadblock, so any help would be appreciated please!

 

In my experiment, participants will learn to associate 5 different faces with 5 unique letter keys (e.g., Face 1 = “O”, Face 2 = “A”, etc). They will be shown the face/letter associations in an initial Learning block, then in a subsequent Naming block, will be shown each face by itself and asked to enter the corresponding letter (e.g., if shown Face 1, the participant would type “O”).

 

The problem I’m running into pertains to the Naming block: I want the block to loop if they enter the wrong letter for at least one of the 5 faces, with the loop ending once they get all 5 faces within a display cycle correct. So for example, if I entered a wrong letter in the first display cycle of the 5 faces, all 5 faces would be shown a second time. If I made no errors during that second display cycle of the faces, the participant would exit the loop and move on to the next part of the study.

 

I’m able to get the block to repeat if an incorrect letter is entered using Display Logic + Loop & Merge, but I can’t figure out how to get the loop to end once the participant enters all the correct letters within a display cycle. Is this even possible? Thank you in advance for your help!

Generally, to exit a loop & merge you would set an embedded data field using JavaScript, and add display logic based on the embedded data field to all questions in the loop.


Leave a Reply