I am trying to randomly display and keep track of three videos I show to participants.
The videos are split into three categories, Novice, Intermediate, and Expert. I currently have it so that a Randomizer block randomly chooses one out of three question blocks. The questions blocks are identical except for the data stored in their Loop and Merge. The Novice block contains videos with score below X. The Intermediate block contains videos with score higher than X but lower than Y. The Expert block contains videos with score higher than Y.
Each of these blocks need to show three random videos from the Loop and Merge data. Field 1 of this data stores the score of the video shown, and Field 2 has the embed link that I embed into the code block.
I was going to store the data through javascript with the following:
var score = parseInt("${lm://Field/1}");
Qualtrics.SurveyEngine.setEmbeddedData("condition", "Z");
Qualtrics.SurveyEngine.setEmbeddedData("scoreVideo", score);
where Z is the condition of the block. However, I realise if I loop through 3 times, it will overwrite the embedded data. I guess my question is two fold:
1) Is there a better way of doing this such that I can every video on the same page without needing set up Loop and Merge data that contains a row for every video shown (I'll have around 20-30 videos for each condition, meaning for a combination of any 3 videos without replication would be 4060 without order or repetition)?
2) How can I keep track of what loop I'm on in the Loop and Merge so I can save the score under some embedded data like var scoreString = "scoreVideo" + loopNum?
Thank you very much for reading! I understand it's a little complex.
Best answer by ahmedA
View original