- Posts: 11
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Can LimeSurvey randomise like this?
- mvdct
- Topic Author
- Offline
- New Member
Less
More
11 years 1 month ago #92753
by mvdct
Can LimeSurvey randomise like this? was created 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.
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.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
11 years 1 month ago #92754
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Can LimeSurvey randomise like this?
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.
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 answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: mvdct
The topic has been locked.
- mvdct
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 1
11 years 1 month ago #92758
by mvdct
Replied by mvdct on topic Can LimeSurvey randomise like this?
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.
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.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
11 years 1 month ago #92759
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Can LimeSurvey randomise like this?
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?
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 answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
11 years 1 month ago #92760
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Can LimeSurvey randomise like this?
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
docs.limesurvey.org/Expression+Manager+S...urvey#Screen_Shots_9
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: mvdct
The topic has been locked.
- mvdct
- Topic Author
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 1
11 years 1 month ago #92761
by mvdct
Replied by mvdct on topic Can LimeSurvey randomise like this?
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.
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
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
11 years 1 month ago #92762
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Can LimeSurvey randomise like this?
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 answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- lepsid
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
11 years 1 month ago #92940
by lepsid
Replied by lepsid on topic Can LimeSurvey randomise like this?
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.
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.
The topic has been locked.
- lepsid
- Offline
- New Member
Less
More
- Posts: 12
- Thank you received: 0
11 years 1 month ago #92999
by lepsid
Replied by lepsid on topic Can LimeSurvey randomise like this?
So, any inputs here?
The topic has been locked.