Welcome to the LimeSurvey Community Forum

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

Repeat question group multiple times

  • stevage
  • stevage's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 10 months ago #96058 by stevage
Repeat question group multiple times was created by stevage
My client wants a survey with a repeating group: answer 4 questions about each of your friends (up to 20), so we have up to 80 questions. If they have less than 20 friends, then we skip the remaining iterations.

From a bit of googling, other people have asked this before (eg www.limesurvey.org/en/forum/can-i-do-thi...some-questions#57848 ) and it's been raised as a feature request ( bugs.limesurvey.org/view.php?id=5668 ).

To make life even more complicated, the survey itself iterates - so the participant answers those 4 questions about each of their 20 friends up to 6 times over 6 months.

I'd just like to know what the best way to implement this is, given the existing constraints (and we're hosting on limeservice). My current thinking is:

1) Add 80 custom attributes (Friend1Q1, Friend1Q2, Friend1Q3, Friend1Q4, Friend2Q1...)
2) At the end of each iteration, download the results, copy them into the extended attributes, upload.
3) Use the attributes to determine whether to ask each question (eg, if Friend5Q1 is blank, don't ask about any more friends.)

Is there any way to smooth this process, make it a bit easier, etc?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 10 months ago #96061 by tpartner
Replied by tpartner on topic Repeat question group multiple times
Why not just ask them up front how many friends they have. The answer to that question could then be used to control the display of the question groups in the first survey and also used in an attribute for later surveys.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
10 years 10 months ago #96074 by Mazi
Replied by Mazi on topic Repeat question group multiple times
Unfortunately looping doesn't work well at Limesurvey due to the fixed structure of the table storing all the survey results.
That being said, you need to add the max number of groups to the survey and then need to use conditions to trigger the display.

It seems to make sense to first ask for their up to 20 friends and then one could have a script which creates a new token with 20 additional attributes at another survey.
At that survey you can then set conditions to each of the 20 groups to only show up if the related attribute fields is filled.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • stevage
  • stevage's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 10 months ago #96077 by stevage
Replied by stevage on topic Repeat question group multiple times
After a bit more investigation, I think the "Array" question types will do the job.

1) Array/text: collect up to 20 names
2) Array (default type, multi choice): the "questions" are the names from 1)
3 and 4 are like 2)

Looks like this should work?
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
10 years 10 months ago #96079 by Mazi
Replied by Mazi on topic Repeat question group multiple times
That might work as well, but users have to re-enter these names when doing the survey again after X months.
You also need to connect the data sets of a user from different periods I guess?!

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • stevage
  • stevage's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 10 months ago #96096 by stevage
Replied by stevage on topic Repeat question group multiple times
Yep, I think we have that step sorted out. (See step 4 here: steveko.wordpress.com/2013/01/21/anonymo...eys-with-limesurvey/ )

Steve
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
10 years 10 months ago #96100 by Mazi
Replied by Mazi on topic Repeat question group multiple times
That is a very useful blog post, thanks for creating and sharing it!

Some comments on the approach: This is a very interesting, though time consuming work-flow. One could speed things up with some PHP coding so that a user automatically gets redirected to a new PHP script at the end of the first survey (there is an "auto-load end URL" setting at the Limesurvey survey settings). That script gets passed the survey ID and data set ID and then reads out the data of the current user and populates the token table at a follow up survey automatically.

This avoids all the manual work and Excel magic you otherwise have to take care of.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose