Dear all,
I fear that this question - or a similar one - was asked before, but I somehow cannot get an answer in the forum and the manual. I use LS 2.6.4-lts.
The short story is: I have a multiple choice array and want to use the answers of the subquestions for array filtering.
The longer story: As a starting point I have a array (numeric) question in checkbox-0/1 mode with 10 rows (for a number of n activities respondents can engage in) and 6 columns (for 6 different groups of people that the respondent engages in the specific activities together). In short, I have a 10x6 array with checkboxes - let's call this question q1, with q1_1_1 to q_10_6.
Now i want to ask further questions for all the combinations in this array that are ticked, e.g. the combination of activity and group, e.g. engagement in activity 1 with group 1, etc. For this reason I would like to transfer/transform the answers from the 10x6 array into a multiple choice variable with 10x6=60 possible rows. This prefilled multiple choice question should be utilised as an array filter for the subsequent questions on the ticked combinations.
Now my question is: do I need Javascript for that prefilling? Reading the manual (
www.limesurvey.org/manual/Expression_Man..._Assignment_Operator
) I get the impression that I could achieve this with the Expression Manager alone, where I first create the 60 row multiple choice question (q2_1 to q2_60) and then assign values to the answers of these subquestions with a hidden equation-type question and some code like:
Code:
{q2_1=if(q1_1_1==1,"Y","N")}
{q2_2=if(q1_1_2==1,"Y","N")}
{q2_3=if(q1_1_3==1,"Y","N")}
{q2_4=if(q1_1_4==1,"Y","N")}
...
{q2_60=if(q1_10_6==1,"Y","N")}
Finally q2, this prefilled multiple choice question, should then serve as array filter for the following questions.
I tried this, but it didn't work out. Do you have an answer to this? Is it possible w/o Javascript as I have the impression from the manual? Or do we need Javascript here (and how about would that work?).
Thanks a lot for your time and help!
Best, G