- Posts: 1
- Thank you received: 0

# How to random whole group of questions?

1 month 5 days ago #202448
by njew9i

*How to random whole group of questions?*was created 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

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

Please Log in to join the conversation.

1 month 5 days ago #202452
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*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":

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:

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/

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":

`{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:

`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.

Please Log in to join the conversation.