Welcome to the LimeSurvey Community Forum

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

Automatically assign participants to one of four groups

  • WhyCantWeBeFriends
  • WhyCantWeBeFriends's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #201104 by WhyCantWeBeFriends
Hello, everyone,

I am currently creating a survey in version 2.62.2. The poll consists of 4 groups. I want to assign participants automatically to one of four groups and have only the corresponding group of questions answered.

The logic is as follows: The first participant is assigned to group 1/A. The second participant is assigned to group 2/b. The third participant 3/c and so on.

Unfortunately I can't find any approach, can you point me in the right direction? Will this be implemented with user groups? Do I have to write equations or can I solve the problem via the interface?

Thanks a lot in advance!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #201105 by Joffm
Hi, unfortunately there is no solution that fits your idea.

Why?
You'd like to have
1. Group A
2. Group B
3. Group C
4. Group D
5. Group A
6. Group B
...

First the general problems of each survey tool.
A respondent starts the survey - he will be assigned to group B, because the previous complete respondent was in group A.
A second respondent starts the survey, what group will he be assigned to?
Still the last completed survey was a "group A" survey; so he also will be assigned to "B"
Until one of them completes his survey new starting respondents will assigned to B; then the next is assigned to "C".
You see, unless a survey is completed, they tool cannot know if the survey will be completed or not.

Or the other way.
A respondent starts the survey - he will be assigned to group B.
A second respondent starts the survey and will be assigned to group C.
And now the first respondent decides that the survey is to boring and closes his browser.


That's the general problem.
The next is that LimeSurvey has a limited quota management; so there is no real access to previous surveys.
You can do this by an ajax call to find the previous assigned group, or even do a "least filled approach" to select the group with the lowest number of respondents. (You remember the problem with two or more starting at nearly the same time)

Well, that's all possible, but what for.
Really you just want to have a random assignment to the four groups.
I can't believe that the order of starting time is a criteria for the groups.

This means you only have to create a random number (yes, in a question of type "equation") like
{if(is_empty(randomnumber),rand(1,4),randomnumber)}
and display your four groups with relevance equation.
Group A : randomnumber==1
Group B : randomnumber==2
...

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
3 years 10 months ago #201148 by lfanfoni
Maybe you can use the SAVEDID variable, that returns the response ID.
As first question, you should put an hidden Equation Question, with this expression:
{(SAVEDID-floor(SAVEDID/4))+1}
This Equation will assume values: 1, 2, 3, 4, 1, 2, 3, 4... for the first, second, third….response
SAVEDID is empty if the survey isn't active, so I suggest to activate a test survey before decide to adopt this solution

Se mi vuoi contattare, non mandare messaggi privati qui, bensì scrivi a lfanfoni at gmail.com
Per le livestream in italiano vai su: www.youtube.com/playlist?list=PLOSjjxAG9...SiiCsSz_JxIH7xJwLdPd
Le soluzioni LimeSurvey per l'Italia si trovano su: github.com/lfanfoni
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #201152 by Joffm
Yes, but you get a SAVEDID even if the respondent doesn't complete the survey.

You will get
1, 2, 3, 4, 1, 2, 3, 4... for the first, second, third….response, but if the 2nd and 6th respondents don't complete, you get 1,3,4,1,3,4 as complete answers.

It doesn't avoid the problem that initially correctly assigned respondents don't complete.

Joffm.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
3 years 10 months ago #201153 by lfanfoni
I didn't read this requirement in the post...where is? It is not possible to know in assignment step if a person will or not complete the survey....

Se mi vuoi contattare, non mandare messaggi privati qui, bensì scrivi a lfanfoni at gmail.com
Per le livestream in italiano vai su: www.youtube.com/playlist?list=PLOSjjxAG9...SiiCsSz_JxIH7xJwLdPd
Le soluzioni LimeSurvey per l'Italia si trovano su: github.com/lfanfoni
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose