how can I make sure that each respondent is randomly assigned to a survey
You see the IF-statement. Here you see that ANYBODY is assigned to one of the surveys.
and that each survey is completed by an equal number of participants?
This is something you can't.
A random number is a random number. But the percentual difference from an equal distribution will be smaller with a high number of participants.
Roll a dice and count, you will see.
should not be random but each entry should be assigned to survey x, the next one to survey y.
Instead of a random number you could use the SAVEDID and the same MODULO calculation as before.
{1+SAVEDID-x*floor(SAVEDID/x)}
with x=number of groups.
But it is not better than a random number.
There are always respondents who do not complete a survey.
One more workaround is:
Watch the distribution and if one group is filled you switch the relevance equation.
Before
Code:
{if(randnum2==1,'123456',
if(randnum2==2,'234567',
if(randnum2==3,'345678',
if(randnum2==4,'456789',
if(randnum2==5,'567890','678901')
)
)
)
)}
After group 3 is filled but group 5 is a bit low
Code:
{if(randnum2==1,'123456',
if(randnum2==2,'234567',
if(randnum2==3,'567890',
if(randnum2==4,'456789',
if(randnum2==5,'567890','678901')
)
)
)
)}
Or there is a plugin "getStatInSurvey" by DenisChenu.
[url]
gitlab.com/SondagesPro/ExportAndStats/getStatInSurvey
[/url]
Here you have a "leastfilled" option.
You see, there are many options.
But these are basics which you can think about yourself.
Joffm