- Posts: 57
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Single Choice to be shown based on some filter
- scene143
- Topic Author
- Offline
- Senior Member
Less
More
3 years 8 months ago #203187
by scene143
Single Choice to be shown based on some filter was created by scene143
Hi,
I have a single choice question like this.
Maruti
BMW
Hyundai
Honda
Audi
But client want to show Maruti and BMW only for US country. Can anyone help me how to hide those 2 codes for other countries?
I have a single choice question like this.
Maruti
BMW
Hyundai
Honda
Audi
But client want to show Maruti and BMW only for US country. Can anyone help me how to hide those 2 codes for other countries?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10099
- Thank you received: 3589
3 years 8 months ago - 3 years 8 months ago #203188
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 Single Choice to be shown based on some filter
There is no direct answer relevance for single choice questions so you have two options...
1) Create a separate question for the US.
2) Insert a hidden multiple-choice question. Toggle the checkboxes in that question with a hidden equation question. Place an array filter on your single-choice, based on the hidden multi-choice. Search the forums - Joffm has given many example of this method.
1) Create a separate question for the US.
2) Insert a hidden multiple-choice question. Toggle the checkboxes in that question with a hidden equation question. Place an array filter on your single-choice, based on the hidden multi-choice. Search the forums - Joffm has given many example of this method.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 8 months ago by tpartner.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
3 years 8 months ago #203190
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Single Choice to be shown based on some filter
In this case I'd recommend to set the default answers of the hidden multiple question to "checked".
Then you have only two assignments to uncheck "Maruti" and "BMW" if country=="US".
Something like
{M1_1=if(country=="US","","Y"}
...
Joffm
Then you have only two assignments to uncheck "Maruti" and "BMW" if country=="US".
Something like
{M1_1=if(country=="US","","Y"}
...
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: tpartner
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11639
- Thank you received: 2737
3 years 8 months ago #203248
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 Single Choice to be shown based on some filter
As far as I understood you want to uncheck if country is NOT =="US".Then you have only two assignments to uncheck "Maruti" and "BMW" if country=="US".
Something like
{M1_1=if(country=="US","","Y"}
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12888
- Thank you received: 3965
3 years 8 months ago #203255
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Single Choice to be shown based on some filter
Oh, so sorry,
it takes too much time between reading and writing something.
Of course it has to be:
{M1_1=if(country=="US","Y",""} because you want to display these brands only if country is "US".
...
Joffm
it takes too much time between reading and writing something.
Of course it has to be:
{M1_1=if(country=="US","Y",""} because you want to display these brands only if country is "US".
...
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.