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
  • FranzGerbig's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 6 months ago - 8 years 6 months ago #124131 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:
  • '!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
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 6 months ago - 8 years 6 months ago #124147 by holch
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?

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.
More
8 years 6 months ago #124150 by jelo
[quote="holch" post=124147What version do you currently use?[/quote]
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
  • FranzGerbig's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 6 months ago - 8 years 6 months ago #124152 by FranzGerbig
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"

using LS 3.13.2+180709
Attachments:
Last edit: 8 years 6 months ago by FranzGerbig.
The topic has been locked.
More
8 years 6 months ago #124155 by jelo
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)

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 6 months ago #124168 by holch
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.

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
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 6 months ago #124180 by holch
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.

File Attachment:

File Name: limesurvey...9(1).lss
File Size:25 KB

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: FranzGerbig
The topic has been locked.
  • FranzGerbig
  • FranzGerbig's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
8 years 6 months ago #124200 by FranzGerbig
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).

using LS 3.13.2+180709
The topic has been locked.
More
8 years 5 months ago - 8 years 5 months ago #126356 by delfin
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.
Last edit: 8 years 5 months ago by delfin. Reason: Included the survey structure as attachment
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 5 months ago #126373 by tpartner
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.
More
8 years 5 months ago #126413 by delfin
Sorry tpartner, didn't think response would be so great. Will not happen again. Thanks again.
The topic has been locked.
More
8 years 5 months ago #126415 by delfin
Sorry it wont happen again.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose