Welcome to the LimeSurvey Community Forum

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

Only display the answer options in ranking if answer in array is in first column

  • sheonliaw
  • sheonliaw's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago - 6 years 4 months ago #160427 by sheonliaw
Want to display the answer option if answer in array is column 1.


Q1: Array question with this structure

________________ Must have | Good to have | Not necessary
Feature 1__________________________x
Feature 2______________x
Feature 3__________________________x
Feature 4______________x
Feature 5__________________________x
Feature 6__________________________x
Feature 7___________________________________________x
Feature 8______________x
Feature 9__________________________________________x
Feature 10_________________________x
Feature 11_________________________x
Feature 12____________x
Feature 13_________________________________________x
Feature 14_________________________x
Feature 15__________________________x

Q2: Please rank your must have features (only for those features with must have answer)
(hide the other not Must have answer)

Feature 2 ---> Feature 8
Feature 4 ---> Feature 12
Feature 8 ---> Feature 4
Feature 12 ---> Feature 2


Any suggestion? don't know much about script.


Thanks! and Wish you have a great day.

survey file

File Attachment:

File Name: limesurvey...6459.zip
File Size:1 KB
Last edit: 6 years 4 months ago by sheonliaw. Reason: space was removed after submited
The topic has been locked.
More
6 years 4 months ago #160428 by jelo
Not aware of simple, direct solution. In other survey packages you would create dynamic lists for must have etc. and than apply them to any question as answer sets.

Feature request 11688: List building - static lists - dynamic lists
bugs.limesurvey.org/view.php?id=11688

It's a pity than relevance equations are only on subquestions and not on answer items.
So EM is not a way to hide certain answeritems in ranking questions.

Perhaps you can do a workaround with "Multiple short text" questions as a filter.
You use the default answers of a "Multiple short text" question to create the answer set via relevance questions. You might use a multiple choice question as well. The default answers of the question can be used as an array filter in the ranking question to show only the relevant answeritems.

What LimeSurvey version is used? Have used this workaround before but not sure if it is working in every LS build.

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: sheonliaw
The topic has been locked.
  • sheonliaw
  • sheonliaw's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago - 6 years 4 months ago #160441 by sheonliaw
Initially the i design the question used MULTIPLE ANSWER question type but can not enforce the every features to be answer (must have, good to have, and not necessary)

Question structure like below.
Q1a - Please select the MUST HAVE features (Multiple answer)
Q1b - Please select the GOOD TO HAVE features (Multiple answer, Array Filter Exclude(Q1a)
Q1c - Please select NOT NECESSARY features (multiple answer, Array filter exclude (Q1a, Q1b)
Q2 - Please rank MUST HAVE features based on answer in Q1a (Multiple answer, Array filter (Q1a)

I cannot control minimum answer in the features, so the problems I faced is the some answer tend to have too few answer in Q1a, Q1b, and even Q1c and leave part of the feature without any selection after Q1a, Q1b, Q1c. For example,

case #1
Q1a - 2,4,9
Q1b - 1, 5
Q1c - 6,10,11 (This caused feature 3,7,8,12,13,14,15 will not be selected)
Q2 - Rank 9,2,4

case #2
Q1a - 2
Q1b - 1
Q1c - 6 (This caused feature 3,4,5,7,8,9,10,11,12,13,14,15 will not be selected)
Q2 - Rank 2

With this MULTIPLE ANSWER with array filter exclusion & array filter setting, I can have ranking question display answer in must have (Q1a) but cannot enforce all features must answer either (must have, good to have, not necessary)

With ARRAY question type, I can enforce every features answer with either (must have, good to have, not necessary) but cannot filter answer selected in Must Have ranking question in Q2.

I was consider using assessment to control the number to be answer in Q1a,Q1b, and Q1c. but dont know how to start with it.

I am using version 2.65.6+170615
Last edit: 6 years 4 months ago by sheonliaw.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 4 months ago #160444 by Joffm
Hi, for your first design you can insert between your array and the ranking:
1. a multiple question (M1)
2. an equation.

Multiple question has exactly the same subquestions as array and ranking.

in the equation preset the options in the multiple like:

{M1_SQ001=(if(Q1_SQ001=="A1","Y",""))}

{M1_SQ002=(if(Q1_SQ002=="A1","Y",""))}

{M1_SQ003=(if(Q1_SQ003=="A1","Y",""))}

Set array filter of ranking question to multiple quetion.

Best regards
Joffm

File Attachment:

File Name: limesurvey...4799.lss
File Size:30 KB

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: spetersWPSM
The topic has been locked.
  • sheonliaw
  • sheonliaw's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago #160549 by sheonliaw
Joffm & Jelo

:) :)

Thanks a lot for the great advice. Will make it work with this model.

Sorry for the late response due to some office works.

Wish you have a great day.
The topic has been locked.
More
5 years 9 months ago #169088 by spetersWPSM
Hi Joffm,


Thanks for the hint, it worked like a charm. Well, almost... Here's why:

1. I downloaded the example and tested - works great!
2. I imported the questions to my survey (with no changes) - not so great anymore!

The reason: whenever I get to the ranking question page, all answers would appear, even the irrelevant ones. The irrelevant answers would only disappear once I make any changes to the list (add, remove items to the right, change order, ...). This happens whenever I get to the question page (e.g. via back/next buttons). See the attached GIF for illustration.

Do you or anyone else have any idea why?? And, more importantly, how we can fix this?

Thanks in advance!



The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago #169093 by holch
You probably did not adapt the relevance equations for the subquestions to the codes in your survey. Otherwise: Post an example .lss file which shows the problem.

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.
More
5 years 9 months ago - 5 years 9 months ago #169098 by spetersWPSM
The thing is: The fact that the ranking question type doesn't allow relevance equations for the subquestions is the reason why I have to do the workaround in the first place.

Anyways, I tried one more thing. I have a custom template/skin for my survey which seems to be the problem. As soon as I switch to default skin, everything works out fine.

I'm gonna search for the specific reason now.

Thanks a lot so far!!


Update: Duplicated my custom skin, applied copy to survey, now everything works. God works in mysterious ways... ô_O
Last edit: 5 years 9 months ago by spetersWPSM.
The topic has been locked.
More
5 years 8 months ago - 5 years 8 months ago #171258 by kaugurs
Hi Joffm,

Thanks for the example! It works when used alone, but in my survey, it does not.
  1. I downloaded the example and tested - works great!
  2. I imported the questions to my survey (with no changes) - not so great anymore!

The problem: When I get to the ranking page, the filtered results appear for a second or two, then it vanishes (it looks like the filter kicks in) and all results are gone.

Does anyone know how to fix this?

Thanks!

Last edit: 5 years 8 months ago by kaugurs.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #171263 by Joffm
Please, provide a sample survey
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
5 years 8 months ago - 5 years 8 months ago #171264 by kaugurs
So I tried to translate everything to ENG, but the base file is in LATVIAN (Lettland).
Please do let me know If I should make an example in DE.

I would make a guess, that this option does not work when it tries to collect the data from different Question groups.
However, it is rather important for me to maintain those separate question groups, cuz I will have some additional questions for each Q group (Building).

Any ideas how to fix this?

File Attachment:

File Name: Test_ranki...7-13.lss
File Size:38 KB
Last edit: 5 years 8 months ago by kaugurs.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #171266 by Joffm
Hi, kaugurs,

either ask question by question
or put the ranking into a separate group.

I created a new group G2 put the ranking into it.

See the result.



Best regards
Joffm

To be honest: I nearly always ask question by question and therefore do not think about different scenarios.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose