Check out the LimeSurvey source code on GitHub!

Can LimeSurvey randomise like this?

More
4 years 1 week ago #92753 by mvdct
Hi LimeSurvey users,

Can LimeSurvey do this?

I want my participants to answer a short series of questionnaires. Then I want them to listen to just one of three possible audio recordings. Then I want them to answer one other short questionnaire.
(All of the questionnaires are the same for all participants irrespective of the audio they listen too)

I can embed the audio into the questions. Thats not a problem. The question I have is can Limesurvey randomly select just one of these three possible recordings?

If LimeSurvey can do it, is it best to set it up so that the three questions are all in one question group or do you set up three separate question groups each with one questions in there?

Remember, I don't want all three questions presented in a random order, I want a random one of three possible questions presented. Can it be done?

Thanks in advance.

Please Log in to join the conversation.

More
4 years 1 week ago #92754 by holch
So basically you are not "randomizing". ;-)

From what I know, LS does not have this feature. Maybe the Expression Manager is able to do this, or maybe you need to create a javacript that writes a random number into a hidden text fiel, which you then can use for conditions to hide 2 of the 3 questions.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: mvdct

Please Log in to join the conversation.

More
4 years 1 week ago #92758 by mvdct
Ah. So thats not randomising then!! Useful to know. Thank you ;-)

So you're right, if it is not "built-in", is there a work around? Can Expression Manager do it? Or javascript?

Please let me know if you have any thoughts anyone.

Thanks in advance.

Please Log in to join the conversation.

More
4 years 1 week ago #92759 by holch
Well, thinking about it, it is actually some kind of randomisation.

Expression Manager is really mighty and I still haven't had the chance to look into it. You can definitely do it with Javascript as I described:
-Create a function that will randomly create a number from 1-x (with x the amount of questions to be randomized).
-Write this number into a hidden text question.
-Create a condition for each of the x questions to show or hide it depending on the random number saved in the hidden text field.

There might be a more elegant solution in EM, but I am not sure. Maybe someone more experienced with Expression Manager can help here?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
4 years 1 week ago #92760 by holch
It is not exactly your case, but it should give an idea how to work with randomization and random numbers in EM:

docs.limesurvey.org/Expression+Manager+S...urvey#Screen_Shots_9

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: mvdct

Please Log in to join the conversation.

More
4 years 1 week ago #92761 by mvdct
Thank you again for your help.

It seems that LimeSurvey can do this using Expression Manager. Very easily too.

It was actually the link just below the one you sent me earlier that provides the correct information:
docs.limesurvey.org/Expression+Manager+S...e_Question_Per_Group

In short:
i. Set up a question group before the question group you want to randomly select one question from.
ii. In that question group place an equation question - call it ask1 (see relevance equation below)
iii. Set this as the equation {floor(rand(1,3.9999))} (3.9... for three options, 4.9... for 4, etc.)
iv. hide the question so participants don't see it
v. Then for each of the questions you want LimeSurvey to randomly select from set a relevance equation: ask1 == 1 [1-3]

Thanks.
The following user(s) said Thank You: kachne

Please Log in to join the conversation.

More
4 years 1 week ago #92762 by holch
Great that it worked out and thanks for taking the time to post the solution here. This might help others with the same problem.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
4 years 4 days ago #92940 by lepsid
Hello!
This example is very useful. What I am trying to do now is to show three questions randomly from group. I played with Expression Manager, but cannot figure out how to setup this.
Can anyone help there using the same example.

Thank you.

Please Log in to join the conversation.

More
4 years 1 day ago #92999 by lepsid
So, any inputs here?

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form