- Posts: 61
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to filter NOT selected answers from multiple questions into single question
- vzyldd
- Topic Author
- Offline
- Senior Member
Less
More
4 years 11 months ago #184090
by vzyldd
How to filter NOT selected answers from multiple questions into single question was created by vzyldd
Need some help please.
I have 2 questions that filter answers from previous questions. Question 1 shows the answers that was previously selected in 9 separate multiple choice questions (each with 3 choices). I used the syntax ({list(Q161a_1.shown, Q161a_2.shown, Q161a_3.shown)} etc. as displayed in image 1) to filter the answers from the previous 9 multiple choice questions into a single choice question.
Question 2 needs to show the answers that was NOT selected. How do I display the NOT selected answers using the same single choice question format?
Both question 1 and two have the same layout. The only difference is in the display of the selected choice in Q1 and the display of the not selected choices in Q2.
I have 2 questions that filter answers from previous questions. Question 1 shows the answers that was previously selected in 9 separate multiple choice questions (each with 3 choices). I used the syntax ({list(Q161a_1.shown, Q161a_2.shown, Q161a_3.shown)} etc. as displayed in image 1) to filter the answers from the previous 9 multiple choice questions into a single choice question.
Question 2 needs to show the answers that was NOT selected. How do I display the NOT selected answers using the same single choice question format?
Both question 1 and two have the same layout. The only difference is in the display of the selected choice in Q1 and the display of the not selected choices in Q2.
Attachments:
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
4 years 11 months ago #184103
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic How to filter NOT selected answers from multiple questions into single question
Well,
I'd recommend you send this part of your survey as *.lss.
As nobody knows what is Q161a_1, Q161a_2, ....
I think you can do this with some kind of hidden array where you set the "not selected" options by equation.
Joffm
I'd recommend you send this part of your survey as *.lss.
As nobody knows what is Q161a_1, Q161a_2, ....
I think you can do this with some kind of hidden array where you set the "not selected" options by equation.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- vzyldd
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
4 years 11 months ago #184108
by vzyldd
Replied by vzyldd on topic How to filter NOT selected answers from multiple questions into single question
Some more background/explanation to my problem. Attached is the lss file to show the questions.
Q16 (question code Q161a, Q162a, Q163a, Q164a, Q165a, Q166a, Q167a, Q168a, Q169a) are the source(s) of the filtered answers (selected choices) shown in Q17 (choices are shown in bold in this question).
Q18 is supposed to have the same look as Q17 and must show the NOT selected choices in Q16 (same question codes used to filter the not selected answers. Respondents will only have to select a single option.
I could only filter the non-selected choices by creating a question for each sub-question asked in Q16 and then use the array filter exclusion function in each question. This looks cluttered and not preferable. To display it in a single question would be ideal.
Any suggestions?
Q16 (question code Q161a, Q162a, Q163a, Q164a, Q165a, Q166a, Q167a, Q168a, Q169a) are the source(s) of the filtered answers (selected choices) shown in Q17 (choices are shown in bold in this question).
Q18 is supposed to have the same look as Q17 and must show the NOT selected choices in Q16 (same question codes used to filter the not selected answers. Respondents will only have to select a single option.
I could only filter the non-selected choices by creating a question for each sub-question asked in Q16 and then use the array filter exclusion function in each question. This looks cluttered and not preferable. To display it in a single question would be ideal.
Any suggestions?
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
4 years 11 months ago - 4 years 11 months ago #184109
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic How to filter NOT selected answers from multiple questions into single question
Something like this (for sub-question 1 of question 18)
Sample survey attached:
One note: when attaching surveys for us to help with, please only include the relevant questions so we don't have to waste time scrolling through and answering unnecessary stuff.
Code:
{list(if(is_empty(Q161a_1), Q161a_1.question, ''), if(is_empty(Q161a_2), Q161a_2.question, ''), if(is_empty(Q161a_3), Q161a_3.question, ''))}
Sample survey attached:
One note: when attaching surveys for us to help with, please only include the relevant questions so we don't have to waste time scrolling through and answering unnecessary stuff.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 4 years 11 months ago by tpartner.
The topic has been locked.
- vzyldd
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
4 years 11 months ago #184110
by vzyldd
Replied by vzyldd on topic How to filter NOT selected answers from multiple questions into single question
Big thank you Tony.
The topic has been locked.