Welcome to the LimeSurvey Community Forum

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

How to set array filter from multiple question to list radio

  • domec_
  • domec_'s Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 9 months ago - 1 year 9 months ago #242452 by domec_
Hello,

I would like to have a filter from a multiple choice question to a single choice (list radio).

For example i have a multiple question as below

Q1- which are your brand?
  • brand 1
  • brand 2
  • brand 3
  • brand 4
  • brand 5
  • brand 6
 If i select Brand 5 and brand 3,  i would like that in Q2 "which brand do you choose between them" (list radio) , it would appear only brand 5 and brand 3 as answers.

I tried with array filter but it doesn't work.
 
Last edit: 1 year 9 months ago by domec_.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 9 months ago #242454 by Joffm
Hi,

but it doesn't work.

This is the worst desciption of an issue.

Did you really consider this?
 
I am rather sure that your codes are different in both questions.

Otherwise send a lss export of these two questions.

Joffm

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

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 9 months ago #242455 by tpartner
Did you use the correct question code in the array filter setting?

Are your sub-question and answer codes identical?

Cheers,
Tony Partner

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

Please Log in to join the conversation.

  • domec_
  • domec_'s Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 9 months ago - 1 year 9 months ago #242456 by domec_
Sorry, i am a basic user of limesurvey
below the questions

Multiple question Q1 "which are your brand?"
code     
SQ002 brand 1
SQ003 brand 2
SQ004 brand 3
SQ005 brand 4
SQ006 brand 5

Single question list radio Q2 "Which brand do you choose between them?"
code 
A2     brand 1
A3     brand 2
A4     brand 3
A5     brand 4
A6     brand 5

I set array filter in the Q2 towards Q1. But if i select brand 3 and brand 5 in Q1, then the filter doesn't work in Q2. I would like that in Q2 will appear only the brands selected in multiple question
   
Last edit: 1 year 9 months ago by domec_.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 9 months ago - 1 year 9 months ago #242457 by Joffm
As we both assumed:
Your codes are not identical.

In Q1 you use "SQ001",...
In Q2 "A1", "A2",...

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 9 months ago by Joffm.

Please Log in to join the conversation.

  • domec_
  • domec_'s Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 9 months ago - 1 year 9 months ago #242468 by domec_
Thank you, now it works!

But i have a problem with "other". If i do the possibility of the option "other" in Q1 but the respondent doens't put any comment, it appear in Q2 even if there is no comment in Q1. I tried to put {Q1_other} in the answers option of Q2, but i have the following result 
Last edit: 1 year 9 months ago by domec_.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 9 months ago - 1 year 9 months ago #242469 by Joffm
Sorry,
if you do not show us what you did, which codes you used, it is difficult to help.

Always the best:
Create a small sample survey with only these questions and send as lss export.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 1 year 9 months ago by Joffm.

Please Log in to join the conversation.

  • domec_
  • domec_'s Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 9 months ago - 1 year 9 months ago #242470 by domec_
Ok thank you a lot for helping

Multiple question
 

Single question
 

This is the result, but i wouldn't the button for other in Q2 if there is no comment in Q1
 

 

File Attachment:

File Name: limesurvey...3436.lss
File Size:20 KB
Last edit: 1 year 9 months ago by domec_.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 9 months ago #242471 by Joffm
Well, not surprising, if you do not do what you are told and what you read.
I already showed this paragraph of the manual
 

And you already know that the codes have to be identical.
An option I always advice is:
Activate the survey, and have a look at the answer table.
Here you see very clear how you access the variables.
 
You see your "normal" codes "A4", "A5" and furthermore you see that the code of the "other"-option is "other"

Meaning in your filtered question this answer option also has to get the code "other"
 



If you enter a not existion code ("A6") this is fine, if you want to have a cascading filter, but always want to show something line "No answer", "No more", ...

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • domec_
  • domec_'s Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 9 months ago #242472 by domec_
Thank you a lot for explaination!
Now  it works perfectly, i get the issue!
 

Please Log in to join the conversation.

  • domec_
  • domec_'s Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 9 months ago #242536 by domec_
Hi Joffm,

Following the example above, is it possible to make appear the Q2(single question), only if there are two answers in Q1? while if in the Q1 the respondents select just one answer, Q2 shouldn't appear

I have no idea how to put this condition

Thanks

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 9 months ago #242537 by Joffm
Count the selected options in Q1.
Only display Q2 if the result is greater than 1.
Manual: ExpressionScript/ implemented functions 

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

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose