Welcome to the LimeSurvey Community Forum

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

How to random whole group of questions?

  • njew9i
  • njew9i's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 9 months ago #202448 by njew9i
Hello.
I've read the forums and I coulnd't find information how to randomize whole group of questions.

For example I've group A,B,C,D and I would like to choose randomly one of the group, so user can see only the questions from this group - and only this ONE group.


Thank you in advance for the tip, I have not found even this answer in the guide. I will be obliged.

Best Regards
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 9 months ago #202452 by holch
Replied by holch on topic How to random whole group of questions?
In this case you are not really "randomizing" the groups (all groups but in random order), but you are randomly displaying one of the 4 groups.

First you need to create a equation type question and generate a random number from 1-4 within it. Once you have tested and everything works, you can hide this questions via the "always hide" feature, but during development and testing I would keep it visible so you can spot issues easier.

So you would put something like this into the equation type question, assuming its question code is "random":
Code:
{if(is_empty(random.NAOK),rand(1,4),random.NAOK)}

Once this is done, you can show/hide each question group based on this random number via relevance equation for the question group.

E.g. for Group A you would put this into the relevance equation field of the question group:
Code:
random==1

So the question group "A" would only be shown if the random number generated equals "1". Then you apply the same approach to group "B" (e.g. random==2) and so on.

Here some more indepth explanations of the concept from Mazi:
survey-consulting.com/how-to-randomly-sh...a-limesurvey-survey/

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