Randomize groups

More
1 year 11 months ago #154615 by Shari
Randomize groups was created by Shari
Hello,

I am working with a German version 2.06+ Build 150930


I have built 3 questionnaires and named them "Randomization" to generate the
group and named the questionnaires "1", "2" and "3". I managed to create a functioning random selection of a user group resulting in the desired result. I, however, am not able to teach the program to then select only questions of the appropriate group. Either the program tells me that the command ((random=="1")) does not work, because the program cannot interpret the word "random". Same with the commands "rand" or "randtumber". Consequently, the selection of the proper questions is not working.

I now ask you to specifically tell me, how the necessary commands have to be spelled out - and into which fields they have to be entered into.

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
1 year 11 months ago #154640 by tpartner
Replied by tpartner on topic Randomize groups
1) At the beginning of the survey, insert an equation type question with question-code "random1".

2) To load a random number between 1 and 3, place this expression in that question:
{if(random1 == '', rand(1, 3), random1)}

3) Insert a relevance equation for each group like:
random1 == 1

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #154711 by Shari
Replied by Shari on topic Randomize groups
Hallo Tony Partner,
Thank you so much for your answer!
Now it´s working :)

Greetings,
Shari

Please Log in or Create an account to join the conversation.

More
1 month 1 week ago #181671 by Mazi
Replied by Mazi on topic Randomize groups
This is also doable for questions instead of groups e.g. if you want to do some A/B testing. See survey-consulting.com/how-to-randomize-i..._used_for_AB_testing for more details and randomizing items at Limesurvey in general.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com
Want to use your survey offline -> www.offlinesurveys.com

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!