Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Randomization numbers don't match in answers

  • mbenakay
  • mbenakay's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago - 3 years 11 months ago #199323 by mbenakay
Hello,

For my survey I had 6 conditions where I wanted to show a different image to each group so I randomly assigned the participants to the 6 conditions. I created the equation {rand(1,6)} and then for each image, in the relevance equation box I assigned a number from 1 to 6 writing ((random==1)).

The survey was working perfectly fine but when I did a test-run, I saw that the numbers are not matching. For example, if I see the image numbered 3 in the survey, it should be written 3 in the answers when I export it. However, for the same image 3, sometimes it's written 4 and sometimes 6 in the answers section for {rand(1,6)}.

How can I know which participant saw which image if the numbers are not matching? Is there a solution for make them match?
Last edit: 3 years 11 months ago by mbenakay.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199325 by Joffm
Hi,
if you do not show us your logic we can not help.

But I suppose you display "group by group" and create the random number in the group where you use it.

As in EXCEL the random number is changed each time the page is loaded.

So.
1. Create your random number(s) outside the group where it is used.
2. Instead of the plain {rand(x,y)} use the construct
{if(is_empty(randomnumber),rand(x,y),randomnumber)}
Meaning: If the random number is still empty, create one, else leave it as it is.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: mbenakay
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose