Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Show 1 out of X questions (randomization)

  • InVare
  • InVare's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 1 month ago #181968 by InVare
Hello,

My study contains questions regarding four different company brands. The survey is between-subject, so participants are only supposed to answer questions concerning a single brand. However, randomization is not working.

1. Part
I assign each participant a random number between 1 and four through an "equation" question containing: {rand(1,4)}
The randomization works and each survey receives a random number. The ID of the equation is "Random".

2. Part
I created 4 questions each with am own condition. Question 1 is only shown if: {rand(1,4)} equals 1
The same applies to the remaining 3 questions with adapted conditions.
I also tried entering the following formular into the relevance field of each question: Random==(1,4)

Problem:
The randomization works but the displayed question is not bound to the prior random integer. For example, the survey receives the random number 1, but any single one of the four questions will be shown, never more than a single one though! I tried several different things, but the problem persists.

I've attached an image of the survey logic view.

I'm using LimeSurvey 3.15.9


Thank you!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 1 month ago #181974 by DenisChenu
Replied by DenisChenu on topic Show 1 out of X questions (randomization)
Here : each time page ios loaded : Random is done again.

If you want it onlly one time:
in equation:
{if(is_empty(self.NAOK),rand(1,4),self.NAOK)}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: InVare
The topic has been locked.
  • InVare
  • InVare's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 1 month ago #182002 by InVare
Replied by InVare on topic Show 1 out of X questions (randomization)
Works like a charm.

Thank you!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose