JavaScript code for a sort of nested randomizer? Randomly pairing images and randomized word lists | XM Community
Skip to main content

I'm a total JavaScript novice, and I'm wondering how/whether the task I'm trying to develop can be implemented in Qualtrics using JavaScript.
Basically, I have a sample of images as well as a list of words I've divided into "word pools," lumping related words together. The task I'm trying to implement would first randomly pair each image with exactly one of these word pools (of which there are enough to sample both images and word pools without replacement), and then randomly select five words (without replacement) from the assigned/paired word pool. I'm trying to implement this in JavaScript, but I'm not quite sure what I'm doing. I assume something like this can be done in Qualtrics through JavaScript, right? Is there a simpler way to accomplish this that wouldn't require custom code? If not, any direction at all would be greatly appreciated -- what are the most relevant references I should be looking at to get this done?
Will be updating this thread as I make progress this afternoon.

Yes we can randomly create pairs and store the data in hidden form type question or in embedded data to use in the future questions.


Leave a Reply