View Issue Details

IDProjectCategoryView StatusLast Update
00557User patchesSurvey at runtimepublic2019-03-14 09:21
Reporteruser132Assigned To 
Status resolvedResolutionfixed 
Target Version2.0 
Summary00557: Random Groups

It would be nice to be able to randomize the groups during the surveys. My current workaround was to create several surveys and randomize forwarding to those surveys. (but then the data had to be merged later) I believe this feature would be valuable.

Additional Information

Now that a group order field has been added to the survey code, it should be possible to randomly generate the order (if desired).


Add option: "Randomize Groups during survey?" (to admin page - html.php?)
Add conditional statements to code (common.php?) based on database selected:

Microsoft SQL Server - ORDER BY NEWID()
Oracle - ORDER BY dbms_random.value

TagsNo tags attached.
Complete LimeSurvey version number (& build)


related to 03107 closedmachaven Selective Question Randomization 


2008-07-09 18:41


randomize_groups.pdf (194,985 bytes)


2008-07-09 18:44


The file "randomize_groups.pdf" contains a modification to accomplish randomization of groups - to be considered as a very rough workaround for the desparate and to be used with care until the feature has been implemented with the official code base by someone more familiar with LimeSurvey.



2010-03-14 00:09

administrator   ~11336

Sirblackadder, are you interested to create a generic patch and so have implemented that functionality into the core?



2010-03-22 17:41

administrator   ~11465

I assume not. Keeping it around for a little.



2010-05-31 17:52

reporter   ~12044

Thank you Sirblackadder! I just tried it in version 1.87+ and it seems to work perfectly.

I would strongly recommend adding this feature in future versions, as randomizing between groups of questions is essential for some research in social sciences.



2010-09-30 21:04

reporter   ~12962

I have tried this workaround in version 1.90+ and it seemed to work perfectly. However when I sent out the invites and got the responses back, I found that some groups were skipped. I also noticed that questions that were marked mandatory weren't mandatory in the survey. They actually had values still in the fields from previous questions.

My survey had groups with 2 questions in each group, first question where they had to read a statement and then rate it on a scale of 1-10. Then the following question asked them to explain their answer (long text type of question).

Some of the answers stated that they didn't get to see all the questions and some people stated that they saw some groups more than once...

I agree that this feature of randomizing groups is very important and is a regular design of surveys. It is particularly important when getting people to grade a product or concept. Here the question order sometimes biases the results where more people will agree with the first one or last one they see.



2010-11-29 13:07

reporter   ~13663

I agree with all the above. Group randomization would be a HUGE benefit to much of my work. I also used it extensively in 1.87+, and have also found the challenges Tektom describes. In fact, I was just about to try the latest build to see if it would help me overcome these problems when I came across this item in the bug tracker. It would be WONDERFUL if adding this feature this can become a priority. (I have two new projects that need it.)



2010-11-29 20:51

administrator   ~13665

Please create an idea in our idea tracker @ and vote for it.



2010-11-30 01:54

reporter   ~13667

It's in there under the title: Need Question Group Randomization.



2010-11-30 15:00

administrator   ~13669



2011-07-09 23:12

reporter   ~15709

I think it is possible to create a randomizing variable (as a token, a javascript self-completed/hidden question, or even as respondents's choice). Then you write (lots of) condition based on it.

Still a tricky workaround though. I am trying to implement something along these lines and will publish the result in the workaround section if I succeed.



2019-03-14 09:08

partner   ~50970

How to randomize groups at the latest Limesurvey version is outlined at



2019-03-14 09:21

developer   ~50971

Randomization group: To start randomizing a question group, enter a string into the field such as randgroup1. You will need to enter that same string in all question groups that you want to randomize and which will then appear in a random order when taking the survey. Only places inside the same group will be randomly switched!

Issue History

Date Modified Username Field Change
2006-08-25 08:52 user132 New Issue
2006-08-25 08:52 user132 Operating System => Debian 3.1
2006-08-25 08:52 user132 Webserver => Apache 1.3.34-2
2006-08-25 08:52 user132 MySQL Version => 4.1.11a-4sarge5
2006-08-25 08:52 user132 PHP Version => 5.1.4-0.1
2006-08-25 10:04 c_schmitz Status new => acknowledged
2007-09-14 12:46 c_schmitz Target Version => 2.0
2008-07-09 18:41 user1163 File Added: randomize_groups.pdf
2008-07-09 18:44 user1163 Note Added: 05197
2010-01-14 23:48 c_schmitz Status acknowledged => confirmed
2010-03-13 16:13 c_schmitz Status confirmed => acknowledged
2010-03-14 00:08 c_schmitz Relationship added related to 03107
2010-03-14 00:09 c_schmitz Note Added: 11336
2010-03-14 00:09 c_schmitz Assigned To => c_schmitz
2010-03-14 00:09 c_schmitz Status acknowledged => feedback
2010-03-22 17:41 c_schmitz Note Added: 11465
2010-03-22 17:41 c_schmitz Assigned To c_schmitz =>
2010-03-22 17:41 c_schmitz Status feedback => confirmed
2010-05-31 17:52 matteo004 Note Added: 12044
2010-09-30 21:04 Tektom Note Added: 12962
2010-11-29 13:07 JoyLaneResearch Note Added: 13663
2010-11-29 20:51 c_schmitz Note Added: 13665
2010-11-30 01:54 JoyLaneResearch Note Added: 13667
2010-11-30 15:00 c_schmitz Note Added: 13669
2011-07-09 23:12 atiut Note Added: 15709
2019-03-14 09:08 Mazi Note Added: 50970
2019-03-14 09:21 DenisChenu Status confirmed => resolved
2019-03-14 09:21 DenisChenu Resolution open => fixed
2019-03-14 09:21 DenisChenu Note Added: 50971