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).
Solved
How to randomly select 3 items without replacement, and embed them in different survey stages?
Best answer by rondev
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 ->
Make sure you declare those three embedded data in the survey flow at the very start of flow.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
