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
  • OleSmit's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 11 months ago #168761 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?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #168768 by tpartner
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
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #168770 by holch
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
  • OleSmit's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 11 months ago #168814 by OleSmit
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! :)
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #168819 by Joffm
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

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #168828 by holch

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
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #168838 by Joffm
holch, you are right.

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
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #168839 by holch
@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.

Lime-years ahead

Online-surveys for every purse and purpose