- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Only include answer in Matrix question if a certain answer was chosen
- picknicker
- Topic Author
- Offline
- New Member
Less
More
4 years 5 months ago - 4 years 5 months ago #190323
by picknicker
Only include answer in Matrix question if a certain answer was chosen was created by picknicker
Hi guys,
I apologize in advance if this question has been asked. I tried to look but could not find it.
I am designing a questionaire and in a matrix-question I want certain answer options only to pop up if a specific answer was given in a previous matrix-question.
I have been able to programm the matrix-qeustion so that the option pops up if the previous matrix-question was answered generally, but I only want it to pop up if a specific answer was chosen.
Let me illustrate:
Previous question:
How cool are cats? very cool cool not so cool
I want an answer-option in the following matrix-question to pop up only if "very cool" or "cool" was chosen, but not if "not so cool" was chosen.
So far I have this: "(( ! is_empty(118367X4X102SQ020)))" but, as mentioned, this lets the answer option in the following matrix-question pop up regardless of which option was chosen.
Can anyone help me out?
Rudi
I apologize in advance if this question has been asked. I tried to look but could not find it.
I am designing a questionaire and in a matrix-question I want certain answer options only to pop up if a specific answer was given in a previous matrix-question.
I have been able to programm the matrix-qeustion so that the option pops up if the previous matrix-question was answered generally, but I only want it to pop up if a specific answer was chosen.
Let me illustrate:
Previous question:
How cool are cats? very cool cool not so cool
I want an answer-option in the following matrix-question to pop up only if "very cool" or "cool" was chosen, but not if "not so cool" was chosen.
So far I have this: "(( ! is_empty(118367X4X102SQ020)))" but, as mentioned, this lets the answer option in the following matrix-question pop up regardless of which option was chosen.
Can anyone help me out?
Rudi
Last edit: 4 years 5 months ago by picknicker.
The topic has been locked.
- orvil
- Offline
- Premium Member
Less
More
- Posts: 111
- Thank you received: 20
4 years 5 months ago #190329
by orvil
Best regards/Beste Grüße,
O. Villani
Replied by orvil on topic Only include answer in Matrix question if a certain answer was chosen
Hi picknicker,
could you please provide your LS version?
Generally: this is a common problem that was reported and discussed several times, but is still unresolved (also in the upcoming version 4).
Fortunately there are some javascript solutions and a plugin from DenisChenu as far as I know (but this depends on the LS version you are using).
Simplest way for you is to use the js plugin if yout LS version fits, if not I am using a js-script I will post if plugin does not fit.
could you please provide your LS version?
Generally: this is a common problem that was reported and discussed several times, but is still unresolved (also in the upcoming version 4).
Fortunately there are some javascript solutions and a plugin from DenisChenu as far as I know (but this depends on the LS version you are using).
Simplest way for you is to use the js plugin if yout LS version fits, if not I am using a js-script I will post if plugin does not fit.
Best regards/Beste Grüße,
O. Villani
The following user(s) said Thank You: picknicker
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
4 years 5 months ago #190330
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 Only include answer in Matrix question if a certain answer was chosen
You can use sub-question relevance but we cannot give an example without knowing the question/sub-question codes.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: picknicker
The topic has been locked.
- picknicker
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
4 years 5 months ago #190333
by picknicker
Replied by picknicker on topic Only include answer in Matrix question if a certain answer was chosen
Thanks guys,
I am using Version 2.73.1
The question codes for the Previous questions are: question code - D3; subquestion code - SQ002; answeroptioncodes - A2 and A3
I am using Version 2.73.1
The question codes for the Previous questions are: question code - D3; subquestion code - SQ002; answeroptioncodes - A2 and A3
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
4 years 5 months ago #190334
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Only include answer in Matrix question if a certain answer was chosen
Main bugreport ID?orvil wrote: Generally: this is a common problem that was reported and discussed several times, but is still unresolved (also in the upcoming version 4)
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- orvil
- Offline
- Premium Member
Less
More
- Posts: 111
- Thank you received: 20
4 years 5 months ago - 4 years 5 months ago #190335
by orvil
Best regards/Beste Grüße,
O. Villani
Replied by orvil on topic Only include answer in Matrix question if a certain answer was chosen
Found it: you will find the solution from Denis here:
extensions.sondages.pro/questions-updati...ing/hideemptycolumn/
But I don't know if its working with 2.73
extensions.sondages.pro/questions-updati...ing/hideemptycolumn/
But I don't know if its working with 2.73
Best regards/Beste Grüße,
O. Villani
Last edit: 4 years 5 months ago by orvil.
The following user(s) said Thank You: picknicker
The topic has been locked.
- orvil
- Offline
- Premium Member
Less
More
- Posts: 111
- Thank you received: 20
4 years 5 months ago #190336
by orvil
Best regards/Beste Grüße,
O. Villani
Replied by orvil on topic Only include answer in Matrix question if a certain answer was chosen
Best regards/Beste Grüße,
O. Villani
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
4 years 5 months ago #190338
by jelo
But it isn't a long time span for the LimeSurvey project
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Only include answer in Matrix question if a certain answer was chosen
Thanks for the link.orvil wrote: Long, long ago:
But it isn't a long time span for the LimeSurvey project
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
4 years 5 months ago #190341
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 Only include answer in Matrix question if a certain answer was chosen
picknicker, are you trying to hide/show columns or rows of the array?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: picknicker
The topic has been locked.
- picknicker
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
4 years 5 months ago #190342
by picknicker
Replied by picknicker on topic Only include answer in Matrix question if a certain answer was chosen
I am trying to hide rows
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
4 years 5 months ago #190344
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Only include answer in Matrix question if a certain answer was chosen
For rows you should be able to use the subquestion relevance box without a problem.
Please provide a LSS file with only the two questions that are relevant, so we can give you an example that works.
To hide a subquestion (NOT Answer option!!) in the following question you can use something like this:
If you would use 1,2 and 3 as answer options instead of the standard A1, A2, A3 it would be even easier:
Please provide a LSS file with only the two questions that are relevant, so we can give you an example that works.
D3; subquestion code - SQ002; answeroptioncodes - A2 and A3
To hide a subquestion (NOT Answer option!!) in the following question you can use something like this:
Code:
D3_SQ002=="A2" OR D3_SQ002=="A3"
If you would use 1,2 and 3 as answer options instead of the standard A1, A2, A3 it would be even easier:
Code:
D3_SQ002>1
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: picknicker
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12881
- Thank you received: 3965
4 years 5 months ago - 4 years 5 months ago #190346
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Only include answer in Matrix question if a certain answer was chosen
So you want to get this
It's sufficient to set the relevance equation of the second question to the "good" condition:
You see that I used the codes "1", "2", ... instead of "A1, "A2",...
This way you could write "Q1_SQ001<3"; or if the 1st question is mandatory "Q1_SQ001!".
Joffm
P.S. You confused the people by saying "answer options", but thinking of subquestions.
It's sufficient to set the relevance equation of the second question to the "good" condition:
You see that I used the codes "1", "2", ... instead of "A1, "A2",...
This way you could write "Q1_SQ001<3"; or if the 1st question is mandatory "Q1_SQ001!".
Joffm
P.S. You confused the people by saying "answer options", but thinking of subquestions.
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 5 months ago by Joffm.
The topic has been locked.