- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
I have two questions in my survey that need random distribution
- OleSmit
- Topic Author
- Offline
- New Member
Less
More
5 years 11 months ago #168761
by OleSmit
I have two questions in my survey that need random distribution was created by OleSmit
Hi everyone! For starters, thanks for taking the time to help me out. Appreciate it.
My survey is as follows (version 2.05 is the version my school requires me to work with):
I have a number of questions:
Q1 = Age
Q2 = Trust in institutions
ETC.
THEN: I have two questions that I want to randomly distribute respondents over.
Question X: Here is a list of four items. Please state how many items you like. (Respondents can enter numeric value)
Question Y: Here is a list of five items. Please state how many items you like. (Respondents can enter numeric value)
What I want to do is; let 50% of respondents answer question X, and 50% answer question Y, randomly. How do I do this?
My survey is as follows (version 2.05 is the version my school requires me to work with):
I have a number of questions:
Q1 = Age
Q2 = Trust in institutions
ETC.
THEN: I have two questions that I want to randomly distribute respondents over.
Question X: Here is a list of four items. Please state how many items you like. (Respondents can enter numeric value)
Question Y: Here is a list of five items. Please state how many items you like. (Respondents can enter numeric value)
What I want to do is; let 50% of respondents answer question X, and 50% answer question Y, randomly. How do I do this?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10108
- Thank you received: 3593
5 years 11 months ago #168768
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic I have two questions in my survey that need random distribution
Add a hidden (via CSS) equation type question and load it with a random number 1-2. Then you can place relevance on those questions based on the value of the hidden equation.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
5 years 11 months ago #168770
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 I have two questions in my survey that need random distribution
And tell your school we said they should update. Urgently!
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.
- OleSmit
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
5 years 11 months ago #168814
by OleSmit
Replied by OleSmit on topic I have two questions in my survey that need random distribution
Thanks for the quick reply! I must admit this all sounds like magic to me. How do I "load" a question with a random number? And how do I place relevance on those questions?
@holch: I'll tell them!
@holch: I'll tell them!
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12923
- Thank you received: 3977
5 years 11 months ago #168819
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic I have two questions in my survey that need random distribution
As tpartner said:
create a question of type "equation" (question code? let's say "randomnumber")
question text: {if(!is_empty(randomnumber),rand(1,2),randomnumber)}
Question 1, relevance equation: "randomnumber==1"
Question 2, relevance equation: "randomnumber==2"
Read the manual about Expression manager,
manual.limesurvey.org/Expression_Manager
and study the sample surveys:
demo.limesurvey.org/admin/admin.php
I hope you did that already.
Regards
Joffm
create a question of type "equation" (question code? let's say "randomnumber")
question text: {if(!is_empty(randomnumber),rand(1,2),randomnumber)}
Question 1, relevance equation: "randomnumber==1"
Question 2, relevance equation: "randomnumber==2"
Read the manual about Expression manager,
manual.limesurvey.org/Expression_Manager
and study the sample surveys:
demo.limesurvey.org/admin/admin.php
I hope you did that already.
Regards
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
5 years 11 months ago #168828
by holch
I thought if you work with EM you can hide it via the backend and it is still triggered? Wasn't the problem with hiding the question via backend only with Javascript solutions?
I think I have done some tests with that a while ago and you could hide it the backend way. Need to test this again!
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 I have two questions in my survey that need random distribution
Add a hidden (via CSS) equation type question
I thought if you work with EM you can hide it via the backend and it is still triggered? Wasn't the problem with hiding the question via backend only with Javascript solutions?
I think I have done some tests with that a while ago and you could hide it the backend way. Need to test this again!
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.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12923
- Thank you received: 3977
5 years 11 months ago #168838
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic I have two questions in my survey that need random distribution
holch, you are right.
Equations etc. you can hide via the backend.
Joffm
Equations etc. you can hide via the backend.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11658
- Thank you received: 2742
5 years 11 months ago #168839
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 I have two questions in my survey that need random distribution
@Joffm: Thank you for the confirmation. I checked as well, same result.
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.