Welcome to the LimeSurvey Community Forum

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

Can I do a cascading based on an Array(Numbers) with checkboxes?

  • Gerard Martínez Görbig
  • Gerard Martínez Görbig's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 4 weeks ago #250737 by Gerard Martínez Görbig
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Cloud   Version 6.2.9

Hello everyone, I have a quick question. I've been reading the manual and forums for long time, but I couldn't find a solution on how to solve my problem. I'm not a coding expert, but I also couldn't find any solution and it's making me crazy, and I'm pretty sure it will be something quite simple.
I have a first question that is an array with checkboxes. There, the participants should check the boxes that can apply. See the picture Array01 attached. 
Then according to their answers, I have a mutliple text question for each category, asking why did they chose this category for every row selected. See picture Array02.
 However, when I select other categories, those rows are added to all the questions. See picture Array03. E.g., the software is taking all options in a single row.
I tried using Array filters (they didn't work) and Relevance equations (!is_empty(G03Q41_SQ001), for example), trying to adapt all examples I could find, but I always have the same problem.
I'm pretty sure it won't be that difficult, and I found some codes that might help, but I can't make them work.

Any help would be highly appreciated.
Thank you!

Best,

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 months 4 weeks ago #250739 by Joffm
Hi,

and Relevance equations (!is_empty(G03Q41_SQ001), for example)

This is wrong.

When you created the question you had to enter TWO subquestion, for the y-axis and the x-axis.
But in your relevance equation you adress only one axis.
If you'd insered this code into the question text with surrounding curly brackets you would have seen an arror.
If you are not sure, it is aleays a good advice to activate the survey, enter some data and have a look at the answer table.
Here you see, how to address the cell and which code is stored.

In an array(numbers) with checkbox layout the selected option is stored as "1" else blank.

So your relevance equation for "Environmental 1" should be
G03Q41_Y001_X002==1, with codes of y-axis "Y001", "Y002", and x-axis "X001", "X002",... (In my opinion less confusing)

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • Gerard Martínez Görbig
  • Gerard Martínez Görbig's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 4 weeks ago #250746 by Gerard Martínez Görbig
Replied by Gerard Martínez Görbig on topic Can I do a cascading based on an Array(Numbers) with checkboxes?
That worked! Thank you very much!!

Actually I tried that before as well, but I wrote the axis in inverse order (G0341_X002_Y001==1), which apparently doesn't work neither.

Thanks again!

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose