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

More
11 months 1 week ago - 11 months 1 week 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: 11 months 1 week ago by sheonliaw. Reason: space was removed after submited

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

More
11 months 1 week 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.

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey
The following user(s) said Thank You: sheonliaw

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

More
11 months 1 week ago - 11 months 1 week 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: 11 months 1 week ago by sheonliaw.

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

More
11 months 1 week 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


Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
The following user(s) said Thank You: spetersWPSM

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

More
11 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
4 months 3 weeks 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
4 months 3 weeks 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
4 months 3 weeks ago - 4 months 3 weeks 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: 4 months 3 weeks ago by spetersWPSM.

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

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

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

More
3 months 1 week ago #171263 by Joffm
Joffm replied the topic: Only display the answer options in ranking if answer in array is in first column
Please, provide a sample survey
Joffm


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

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

More
3 months 1 week ago - 3 months 1 week ago #171264 by kaugurs
kaugurs replied the topic: Only display the answer options in ranking if answer in array is in first column
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
Attachments:
Last Edit: 3 months 1 week ago by kaugurs.

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

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

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

More
3 months 1 week ago - 3 months 1 week ago #171270 by kaugurs
kaugurs replied the topic: Only display the answer options in ranking if answer in array is in first column
Thanks, Joffm for your input,
but this doesn't really suit me.
The groups make a lot of sense 'cuz I have 24 buildings and I need to ask several different type questions about each of them. One question asks if you want to nominate it for the contest.
The final group should allow you to sort among those you have nominated.

Doing it Q by Q would multiply the length of the survey by a factor of 5 (24 X 5 = 120 questions).

Just to make it clear, DID YOU get the result by maintaining the group structure?
In my experiments, 2 groups work fine (picking options in 1 and sorting in the other), but when you have 2 or more groups to mark options and the third to sort them, it all brakes down.

Has anyone tried the JavaScript method?
Last Edit: 3 months 1 week ago by kaugurs.

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

More
3 months 1 week ago #171271 by kaugurs
kaugurs replied the topic: Only display the answer options in ranking if answer in array is in first column
In fact, it all actually works perfect, with that 1 glitch --> It almost skips over the SORTING question.
I'm thinking of a rude workaround: 1) Make SORTING mandatory, 2)add simple text MSG "Please push NEXT button", and 3) VIOLA! It shows up nicely after the warning message. :)

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

More
3 months 1 week ago #171272 by Joffm
Joffm replied the topic: Only display the answer options in ranking if answer in array is in first column
Hi,

what I'd said, is:
Either ...
Or Create a new group G2, where you put the ranking question.
So group G1 only contains the not visible question and the equation.

See here:

File Attachment:

File Name: limesurvey...6119.lss
File Size:39 KB


Best regards
Joffm


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

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!