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

More
7 months 2 weeks ago - 7 months 2 weeks ago #160427 by sheonliaw
sheonliaw created the topic: Only display the answer options in ranking if answer in array is in first column
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
Attachments:
Last Edit: 7 months 2 weeks ago by sheonliaw. Reason: space was removed after submited

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #160428 by jelo
jelo replied the topic: Only display the answer options in ranking if answer in array is in first column
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 following user(s) said Thank You: sheonliaw

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago - 7 months 2 weeks ago #160441 by sheonliaw
sheonliaw replied the topic: Only display the answer options in ranking if answer in array is in first column
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: 7 months 2 weeks ago by sheonliaw.

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #160444 by Joffm
Joffm replied the topic: Only display the answer options in ranking if answer in array is in first column
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
Attachments:
The following user(s) said Thank You: spetersWPSM

Please Log in or Create an account to join the conversation.

More
7 months 1 week ago #160549 by sheonliaw
sheonliaw replied the topic: Only display the answer options in ranking if answer in array is in first column
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.

Please Log in or Create an account to join the conversation.

More
1 month 13 hours ago #169088 by spetersWPSM
spetersWPSM replied the topic: Only display the answer options in ranking if answer in array is in first column
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!



Please Log in or Create an account to join the conversation.

More
1 month 12 hours ago #169093 by holch
holch replied the topic: Only display the answer options in ranking if answer in array is in first column
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'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
1 month 12 hours ago - 1 month 11 hours ago #169098 by spetersWPSM
spetersWPSM replied the topic: Only display the answer options in ranking if answer in array is in first column
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: 1 month 11 hours ago by spetersWPSM.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!