How to randomly select 3 items without replacement, and embed them in different survey stages?

How to randomly select 3 items without replacement, and embed them in different survey stages?
I want to randomly select 3 images out of 100+ images, and embed them in different questions throughout the survey. It is crucial that every single respondent will not see the same image twice (randomizing without replacement), for example, respondent A can see images 1, 2, 3 but not images 1, 1, 2. What is the best way to do this? the number of questions after each image varies (and is actually conditioned on other questions previously answered using display logic).
Best Answer
-
rondev Community Member - Trial User Wizard ✭✭✭✭✭
The JS written here, stores the image url into three different embedded data i.e. firstPicture, secondPicture, thirdPicture. Then you just need to pipe these embedded data into the img tag src as ->
<img src="${e://Field/firstPicture}" />
Make sure you declare those three embedded data in the survey flow at the very start of flow.
0
Answers
Same post here
thanks @rondev , not exactly though. I would like to take each of these images and embed them in different places in the survey individually (not as 3 images)
thanks!!
@rondev or @SurajK do you know how I can view each of the variables (firstPicture, secondPicture...) when I export my dataset? I created three embedded data variables with those names, but they don't record which image each respondent was assigned (they just appear as blank variables).