Check out the LimeSurvey source code on GitHub!

Passing on column values between multiple matrices

5 years 2 months ago #70146 by aklisboa
Hi everyone,

I am running into a problem creating a survey.

My first question is multiple choice question. Then, I randomly select not more than 4 answers from that multiple choice question to fill the column matrix question (i.e. each of the 4 random draws is a line on a Likert scale now, the others are hidden with JS). The thrid (forth, fifth and so on..) questions are again Likert scale Matrix questions and should use the same answer options as the second one. That last thing (passing on the 4 randomly selcted options beyond question 2) is what I can't get to work.
Does anybody have an idea how to do this?

Thanks in advance

This is how it's supposed to work:
Question 1:
Which dog breeds do you know? (multiple choice list of 30 breeds)

Question 2: (no problem here)
Select up to 4 known breeds randomnly and present in Matrix question

Question 3 (-> that's where I'm stuck!)
Getting the exact 4 breeds in that order from question 2 in another Matrix question

Please Log in to join the conversation.

5 years 2 months ago #70155 by tpartner
How do you filter Q2?

Maybe if you are using "group-by-group" mode you can:

1) In the Q1 group, add a hidden multiple options question (QHidden) with the same answer codes as Q1.

2) Use JavaScript to check the same options in the hidden question as checked in Q1.

3) Use JavaScript to uncheck random options, leaving the required number checked.

4) Filter the following array with QHidden.

Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: aklisboa

Please Log in to join the conversation.

5 years 2 months ago #70164 by aklisboa
Sweet, works like a charm!

Please Log in to join the conversation.

5 years 2 months ago #70165 by Mazi

aklisboa wrote: Sweet, works like a charm!

You're welcome!

If our hints have been helpful and you enjoy limesurvey please consider a donation to the team .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)'"

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form