Columns filtering (relevance) based on previous question

More
2 years 9 months ago #136506 by alexdp
Hello to all of you !
I found some answers to my problem but the suggested solutions do not fit my particular situation. I am not knowledable enough to succeed in modifying javascripts or plugins so they do what I want. So here is the situation:

I am working with LS 2.06+ Build 160129.
The questions will be displayed on the same page (most probably)
=============================
Question 1 (type = one choice radio button)
How many cats do you own?
o 1 cat
o 2 cats
o 3 cats
....
o 8 cats
Answer varies from 1 to 8
Lets say the respondent has 3 cats
=============================
Question 2 (type = multiple short text)
What is the name of each cat you own?
Name of cat 1: sultan
Name of cat 2: beeloo
Name of cat 3: pacha
It is easy to filter the rows with relevance box for each sub-question so the number of rows displayed is equal to the number selected in Question 1. No problem here
For each sub-question I put the following filter in the relevance boxes (8 boxes) : Q01.code > 0, Q01.code >1 ...., Q01.code >7
Essentially, for a given line (lets say 4), it will be displayed if the respondent clicked on radio button 4 or 5 or 6 or 7 or 8
===================================
Question 3 (type = array text or array numbers, etc)
For each cat you own, answer the following questions (about 25 sub-questions):
sultan beeloo pacha
Weight
Age
Sex
Colour
...
Race
In the X-scale, I can enter all the sub-questions
On the Y-scale, I can list all the cats' names with something like this: {Q02_1.shown}, {Q02_2.shown}, ..... {Q02_8.shown}
Looking at the question I see
Sultan Beeloo Pacha Empty box ...... Empty box
Weight
Age
Sex
Colour
...
Race
Unfortunately, there are no relevances or filters for the colums (Y scale).
The way I envision the solution is:

For each of the 8 possible columns (coded 1 to 8) one has to check if : answer to question 1 (number of cats owned) is more than column number - 1
So for Question number of cats owned = 4
Column 1 : displayed if Q1.value > 0 : 4 > 0 : True >>> Displayed
Column 2 : displayed if Q1.value > 0 : 4 > 1 : True >>> Displayed
Column 3 : displayed if Q1.value > 0 : 4 > 2 : True >>> Displayed
Column 4 : displayed if Q1.value > 0 : 4 > 3 : True >>> Displayed
Column 5 : displayed if Q1.value > 0 : 4 > 4 : False >>> Not displayed
Column 6 : displayed if Q1.value > 0 : 4 > 5 : False >>> Not displayed
Column 7 : displayed if Q1.value > 0 : 4 > 6 : False >>> Not displayed
Column 8 : displayed if Q1.value > 0 : 4 > 7 : False >>> Not displayed
Now the problem is how can I do this ?
Thanks again for reading all this.

Please Log in or Create an account to join the conversation.

More
2 years 9 months ago - 2 years 9 months ago #136514 by tpartner
I'm not in a position to test this weekend but you may be able to filter with a hidden multiple-choice question toggled by JavaScript. Try searching the forum for "hidden multiple-choice".

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 2 years 9 months ago by tpartner.

Please Log in or Create an account to join the conversation.

More
2 years 8 months ago #136531 by alexdp
Hello,
Thank you for you reply. I had a look at the 33 responses for hidden multiple choice and its not exactly what I need.
I also tried the plugin of Mr Chenu. This is nice and the Demo works with LS 2.06. However, I really don't understand how it works. All I see is the word "LIGNES" or "COLONNES" in array filter. Where is the EM? I display the logic page report but could not find any relevant EM.
As a newbie, I am lost. Can someone who is using the plugin bring me up to date on the use of the plugin?
Thank you again.

Note : It would be so nice to have relevance for columns just like we have for rows in LS 2.06.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!