Welcome to the LimeSurvey Community Forum

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

Relevance on Array-filtered question

  • JSamarov
  • JSamarov's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago #224507 by JSamarov
Relevance on Array-filtered question was created by JSamarov
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 5.2.11
Own server or LimeSurvey hosting:  LimeSurvey Cloud
==================

Hi All )

Is it possible set up a Relevance on a filtered question? In other words:
  • Q1 is a multiple choice (10 answers)
  • Q2 is a Ranking that has Array Filter: Q1 (max 3 answers)
  • Q3 needs to be displayed only if Q2_SQ001 == "Y"
Otherwise, is there a workaround? I've been struggling to find a workable solution unfortunately. 

 
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224508 by Joffm
Replied by Joffm on topic Relevance on Array-filtered question
Hi,

Q2_SQ001 == "Y"

This will never work. This is a syntax of a multiple question.

Have a look at the answer table after you activated the survey
A ranking question "Q2" is saved the way that
Q2_1 contains the code of the object on 1st place
Q2_2 contains the code of the object on 2nd place
Q2_3 contains the code of the object on 3rd place

So what do you want to achieve?
Show Q3 only if object 2 was on 1st place?
Show Q3 only if object 2 was selected on one of the first three ranks?

Please explain

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • JSamarov
  • JSamarov's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago #224509 by JSamarov
Replied by JSamarov on topic Relevance on Array-filtered question
HI Joffm,

Thanks for the below.
Speaking more practically, I actually need to show 3 Groups (i.e. Categories) of questions based on the Group Condition:
* Q2_SQ001 == "Y" for Group 1
* Q2_SQ002 == "Y" for Group 2
* Q2_SQ003 == "Y" for Group 3

Example (screen attached).
You're quite right though regarding the a syntax of a multiple question.
Is there a way to reference   selections in Ranking?

Jay
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224512 by Joffm
Replied by Joffm on topic Relevance on Array-filtered question

 Q2_SQ001 == "Y"

But you have a ranking question. And then it is wrong.

And what do you do.
In your screenshot you refer to G02Q11_SQ001, but in your text it is "Q2_SQ001"?

Better you send a lss export of your tries.
And explain, which conditions have to be fulfilled that Group 1, Group 2,...  are displayed.

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 4 months ago #224546 by DenisChenu
Replied by DenisChenu on topic Relevance on Array-filtered question

Q2 is a Ranking that has Array Filter: Q1 (max 3 answers)

 
See www.limesurvey.org/manual/Expression_Man...code_Variable_Naming

RRanking StyleQ271-4  {Q27_1}{Q27_1.shown}{Q27_1==3}

Then , i think (Q2_1.NAOK == "SQ001" or Q2_2.NAOK == "SQ001" or Q2_2.NAOK == "SQ001")

Show us the logic file for example.
Tell us the answer code, the question code …

or send a simple lss …
 

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
  • JSamarov
  • JSamarov's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 4 months ago #224551 by JSamarov
Replied by JSamarov on topic Relevance on Array-filtered question
Hi Joffm / DenisChenu,

Thank you very much for looking into this! It feels like it should be such a simple challenge , yet I just can't crack it :/

File attached. In short:
  1. User selects Brands in Q2 (multiple choice)
  2. In Q3 the user Ranks the Q2-selected brands (max answer 3, filter array Q2)
  3. Thereafter, Group 1, Group 2 etc kick it only for the Q3's ranked choices. 
    1. My idea was to do this standard loop by simply using Group Relevance on Q3, but clearly it doesn't work that way with the type: Ranking.
Thanks again in advance! 
Jay
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 4 months ago #224570 by Joffm
Replied by Joffm on topic Relevance on Array-filtered question
So you want to show the following groups only for the brands that were selected on the first thfree ranks of Q2?
That's easy:
As I told you before, a ranking question stores the values like this
Q3_1: 1st place of ranking, the code is stored
Q3_2: 2ndplace of ranking, the code is stored
Q3_3: 3rd place of ranking, the code is stored

So your group relevance is:
Survey Now: Q3_1=="SQ001" OR Q3_2=="SQ001" OR Q3_3=="SQ001"
Taluna: Q3_1=="SQ002" OR Q3_2=="SQ002" OR Q3_3=="SQ002"

By the way:
Your ranking question is not limited to three selections.
The "other" option doesn't work correctly.
As also said before: Activate the survey, enter some data and have a look at the answers.
You see how values are stored and how to access the variable.

​​​​​​​Joffm
​​​​​​​

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu, JSamarov
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose