- 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 display/hide subquestions based on dual scale answers?
- FranzGerbig
- Topic Author
- Offline
- Senior Member
Less
More
8 years 6 months ago - 8 years 6 months ago #124131
by FranzGerbig
using LS 3.13.2+180709
How to display/hide subquestions based on dual scale answers? was created by FranzGerbig
Hi folks,
following problem ...
q1: array duale scale
scale 1: rating 1-3
scale 2: just 1 option ("used")
q2: array
same subquestions as in q1, but ...
In q2 I'd like to display only those subquestions for which (the single option of) scale 2 in q1 was ticked.
And to hide all other q1_subquestions with scale2 not ticked.
And to hide the wohle question if none of q1_subquestions with scale2 not ticked.
I've been trying (struggling) with:
Thanks a lot for ideas or hints
bilo
following problem ...
q1: array duale scale
scale 1: rating 1-3
scale 2: just 1 option ("used")
q2: array
same subquestions as in q1, but ...
In q2 I'd like to display only those subquestions for which (the single option of) scale 2 in q1 was ticked.
And to hide all other q1_subquestions with scale2 not ticked.
And to hide the wohle question if none of q1_subquestions with scale2 not ticked.
I've been trying (struggling) with:
- '!is_empty(name)' (no way),
- In the subquestion label text something like {if(q1_001_1 == "A1", "label text","")}.
It works - but if q1_001_1 == "no answer", q2_001 (supposed to be hidden) is still displayed, though without the label text, but with the same rating scale as the other subquestions (supposed to be displayed), since the label may be tailored but not determine (display/hide) the whole subquestion.
Thanks a lot for ideas or hints
bilo
using LS 3.13.2+180709
Last edit: 8 years 6 months ago by FranzGerbig.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
8 years 6 months ago - 8 years 6 months ago #124147
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 How to display/hide subquestions based on dual scale answers?
From 2.06+ onwards you can show/hide subquestions with relevance equations. I haven't tested it, but it should also work with dual scale arrays.
What version do you currently use?
What version do you currently use?
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Last edit: 8 years 6 months ago by holch.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
8 years 6 months ago #124150
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 How to display/hide subquestions based on dual scale answers?
[quote="holch" post=124147What version do you currently use?[/quote]
At least LS 2.06+ 150812.
At least LS 2.06+ 150812.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: FranzGerbig
The topic has been locked.
- FranzGerbig
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
8 years 6 months ago - 8 years 6 months ago #124152
by FranzGerbig
using LS 3.13.2+180709
Replied by FranzGerbig on topic How to display/hide subquestions based on dual scale answers?
yes, LS 2.06+ 150812 is being used.
Nonetheless I don't get it work :dry:
I put
if(Vernetzung_h1m03v05q001_1 == "A1", "")
into the subquestion relevance equation.
The logic file error note:
"Function does not support 2 arguments
Function supports this many arguments, where -1=unlimited: 3; Not a valid expression"
Nonetheless I don't get it work :dry:
I put
if(Vernetzung_h1m03v05q001_1 == "A1", "")
into the subquestion relevance equation.
The logic file error note:
"Function does not support 2 arguments
Function supports this many arguments, where -1=unlimited: 3; Not a valid expression"
using LS 3.13.2+180709
Attachments:
Last edit: 8 years 6 months ago by FranzGerbig.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5070
- Thank you received: 1263
8 years 6 months ago #124155
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 How to display/hide subquestions based on dual scale answers?
That won't work. Relevance implies "If true". You can enter a condition, when true, will display the subquestion. If the relevance is not given the sub-question won't be displayed.
Mostly you work with negative empty function to only be true, if something is entered.
!is_empty(variablename)
Mostly you work with negative empty function to only be true, if something is entered.
!is_empty(variablename)
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
8 years 6 months ago #124168
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 How to display/hide subquestions based on dual scale answers?
The way I understand it, the subquestion should only be schon in the second question when a specific value was marked in the second scale of the first question.
Could you maybe give us these 2 questions as an example?
By the way: in the relevanc equation, you don't need the if (it gives you an error). Let's assume that the subquestion should be shown when Vernetzung_h1m03v05q001_1 == A1, then you write exactly this into the relevance equation. No if, no other value, nothing.
EM will then check if this code is true and if yes show the subquestion. If not, it will not show it.
Could you maybe give us these 2 questions as an example?
By the way: in the relevanc equation, you don't need the if (it gives you an error). Let's assume that the subquestion should be shown when Vernetzung_h1m03v05q001_1 == A1, then you write exactly this into the relevance equation. No if, no other value, nothing.
EM will then check if this code is true and if yes show the subquestion. If not, it will not show it.
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.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
8 years 6 months ago #124180
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 How to display/hide subquestions based on dual scale answers?
Made a test survey as I had never used this function before to see how it works and seems to work fine.
Please find a test survey attached. In the first group I did a test for a normal array question, as I wanted to make sure it works just fine and I didn't know how to exactly reference the second scale in a dual scale matrix.
In the second question group it should show your case.
By the way: I would use two answers for the second scale ("Used" / "Not used"), because once you have clicked you can not unclick a single radio button, which could be a problem.
Please find a test survey attached. In the first group I did a test for a normal array question, as I wanted to make sure it works just fine and I didn't know how to exactly reference the second scale in a dual scale matrix.
In the second question group it should show your case.
By the way: I would use two answers for the second scale ("Used" / "Not used"), because once you have clicked you can not unclick a single radio button, which could be a problem.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Attachments:
The following user(s) said Thank You: FranzGerbig
The topic has been locked.
- FranzGerbig
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
8 years 6 months ago #124200
by FranzGerbig
using LS 3.13.2+180709
Replied by FranzGerbig on topic How to display/hide subquestions based on dual scale answers?
Good morning,
you're so great - and the equation a lot easier than I had understood - just great.
That is: it works just fine.
THANKS a very lot
PS:
Of course, you're damn right - there should be a second option ("not used") in scale 2 of q1. Let's see, if we may adapt this (complicated reasons).
you're so great - and the equation a lot easier than I had understood - just great.
That is: it works just fine.
THANKS a very lot
PS:
Of course, you're damn right - there should be a second option ("not used") in scale 2 of q1. Let's see, if we may adapt this (complicated reasons).
using LS 3.13.2+180709
The topic has been locked.
- delfin
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
8 years 5 months ago - 8 years 5 months ago #126356
by delfin
Replied by delfin on topic How to display/hide subquestions based on dual scale answers?
Hi guys,
Can someone help me with ticket #126355?
"Hi guys,
I need help. I want to put a RANK question that filters the subquestions based on a previous question answer. That previous question is a an ARRAY DUAL SCALE on dropdown. The filter would be based on the options chose on the first scale. So what I want is that if they choose option 3,4 or 5 this answer options would show on the RANK question, or than the options 1 and 2 are filtered or hidden on the ranking question.
Pls see the URL for this, I can do skype to show. Thank you in advance. My skype ID is pedrodelfin@hotmail.com
delfin.limequery.com/index.php/admin/que...197653/gid/1/qid/116
"
Attached is the survey Structure.
Can someone help me with ticket #126355?
"Hi guys,
I need help. I want to put a RANK question that filters the subquestions based on a previous question answer. That previous question is a an ARRAY DUAL SCALE on dropdown. The filter would be based on the options chose on the first scale. So what I want is that if they choose option 3,4 or 5 this answer options would show on the RANK question, or than the options 1 and 2 are filtered or hidden on the ranking question.
Pls see the URL for this, I can do skype to show. Thank you in advance. My skype ID is pedrodelfin@hotmail.com
delfin.limequery.com/index.php/admin/que...197653/gid/1/qid/116
"
Attached is the survey Structure.
Attachments:
Last edit: 8 years 5 months ago by delfin. Reason: Included the survey structure as attachment
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3691
8 years 5 months ago #126373
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 display/hide subquestions based on dual scale answers?
Please do not double-post.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- delfin
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
8 years 5 months ago #126413
by delfin
Replied by delfin on topic How to display/hide subquestions based on dual scale answers?
Sorry tpartner, didn't think response would be so great. Will not happen again. Thanks again.
The topic has been locked.
- delfin
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
8 years 5 months ago #126415
by delfin
Replied by delfin on topic How to display/hide subquestions based on dual scale answers?
Sorry it wont happen again.
The topic has been locked.