Welcome, Guest
Username: Password: Remember me

TOPIC: Assign to a condition based on the question group score in the same survey

Assign to a condition based on the question group score in the same survey 3 years 7 months ago #58064

  • kinji5
  • kinji5's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Hello,

I am trying to figure out how to do a survey with pre-test and the score from that pre-test will determine which condition the participant will get.

Example:
Survey will have three question group.
First group will be the pre-test and the result will determin which of the remain two question group to be presented.

If the score from the first question group is:
from 1 to 2 and 6 to 7 then the participant will be presented with the "control" question group
from 3 to 5 then the participant will be presented with the "experiment" question group

Thanks!
Last Edit: 3 years 7 months ago by kinji5.
The administrator has disabled public write access.

Re: Assign to a condition based on the question group score in the same survey 3 years 7 months ago #58067

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4271
  • Thank you received: 805
  • Karma: 369
You can use conditions to hide or show questions based on the answers of previous questions - docs.limesurvey.org/Setting+conditions&s...tions+for+LimeSurvey
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Assign to a condition based on the question group score in the same survey 3 years 7 months ago #58142

  • kinji5
  • kinji5's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Hello,
Thanks for the reply. I tried using conditions. However it does not look like there is a way to select multiple questions in a previous group and figure out an average based on the answers.

So the average of the group determines which condition to go next.
The administrator has disabled public write access.

Re: Assign to a condition based on the question group score in the same survey 3 years 7 months ago #58149

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4271
  • Thank you received: 805
  • Karma: 369
Ah, in that case you will probably need to use JavaScript to calculate the average and populate a hidden question that could be used for conditions.

The details of the script(s) would depend on question type and whether or not they were dispalyed on the same page.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Assign to a condition based on the question group score in the same survey 3 years 7 months ago #58150

  • kinji5
  • kinji5's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
I think I found half the answer.. Using a modified version of Javascript found in the Workarounds LINK

The next part is how to use the resulting number to move to a group and have the survey continue there?

Do I use the "document.limesurvey.move.value = SIDXGIDXQID2;"?
I tried it and it didn't jump to that question.

Thanks,
Last Edit: 3 years 7 months ago by kinji5.
The administrator has disabled public write access.

Re: Assign to a condition based on the question group score in the same survey 3 years 7 months ago #58154

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4271
  • Thank you received: 805
  • Karma: 369
I would populate a hidden question with the value and then use conditions based on that question to show or hide subsequent questions (and groups).
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.091 seconds
Donation Image