Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Can I use answer of multi-checkbox question to filter ranking options?

  • rockyist
  • rockyist's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
9 months 3 weeks ago #244812 by rockyist
Your LimeSurvey version: Version 5.6.14+230403
Survey theme/template: Fruity
==================
Hello all, 

Now I'm trying to use answers from the previous multi-checkbox question (irrelevant in the survey) to filter the options displayed in the ranking question (preference). I want to use an in-between question (irrelevantHidden) to conduct some assignments.  It works well when the in-between question is displayed but doesn't work when it's hidden. I'm wondering if it's possible to achieve what I want and hide the in-between question at the same time. Or do you have other suggestions? You can check the survey file in the attached document.

Best,

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 months 3 weeks ago #244818 by Joffm
Hi,
I do not see an issue, IF I hide the question in the correct way.
You used "Always hide this question" ON.
This is wrong. Now the question isn't existing in the DOM anymore.
You have to hide the question by css, so enter the class "hidden" in the respective field "css classes".

Some other remarks:
{IrrelevantHidden_SQ3=if(Irrelevant_SQ3_Y1=='1', 'Y', Irrelevant_SQ3_Y1)}
You are lucky that in your array(number) the not selected option is also stored as blank.
Shorter: {IrrelevantHidden_SQ3=if(Irrelevant_SQ3_Y1=='1', 'Y', '')}

What for do you insert the script in "preference"?
You see that it refers to a surveyID 479167. See the sgqa-codes.
But your sent survey has an ID 768183.
It doesn't work and isn't necessary; you use the array exclusion filter.

In "ReasonNotUsing" you use the property "shown" in your condition. But don't you want to use the code insted of the shown text?
Well, it works in your case, but it is not correct.
Better: sum(Irrelevant_SQ3_Y1.NAOK, Irrelevant_SQ4_Y1.NAOK, Irrelevant_SQ6_Y1.NAOK, Irrelevant_SQ8_Y1.NAOK)>0
The same here:
You write an equation into the question text, because rows with empty text are not displayed.
But you really should use subquestion relevance
Only: Irrelevant_SQ3_Y1==1

In Irrelevant:
Your subquestion relevance equations
if(MainmodeCode == 'SQ1',0,1)
You know that a relevance equation is a logical term that is either TRUE or FALSE. If TRUE the item is displayed.
So MainmodeCode != 'SQ1' is absolutely sufficient. Either MainmodeCode is not equal SQ1 -> TRUE or is equal -> FALSE

There seem to be some relicts from many many years ago, where some actual features were not available.

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 months 3 weeks ago #244819 by tpartner
Hide the question with CSS class "hidden".

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: rockyist

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose