fill ranking array with answers from previous question

More
6 years 5 months ago #59432 by janwillem64
janwillem64 created the topic: fill ranking array with answers from previous question
Hello,

I'm having a ranking question and I'm trying to build an array list or label set from answers from a previous question (label set).

Is this possible in LimeSurvey?

Jan Willem de Lange

Please Log in to join the conversation.

More
6 years 5 months ago #59434 by lsexton
lsexton replied the topic: fill ranking array with answers from previous question
Hi there,

I'm trying to do something similar, where the list of the items to rank is to be built from a 5-point scale array, but only if they mention punches 1-4 for any of the items in the array (i.e. if they mention punch 5, the option shouldn't exist in the ranking question).

Is there a simple workaround for this? Thanks for the help!

Luke

Please Log in to join the conversation.

More
6 years 5 months ago #59455 by lsexton
lsexton replied the topic: fill ranking array with answers from previous question
Hi again,

Let me provide some additional information:

Limesurvey version is 1.86

I am trying to build the list of items to rank based on the respondents answer to the previous question.

The previous question is an array (flexible labels) type, using a 5-point scale.

The question I'm trying to modify is a Ranking type question. I only want to respondent able to rank those that they rated 1-4 in the previous question, and to not display those they rated 5.

I have set-up the javascript requirements and have javascript working on some previous questions (to hide responses based on selections etc).

Any help will be greatly appreciated!

Thanks!

Please Log in to join the conversation.

More
6 years 5 months ago #59487 by tpartner
tpartner replied the topic: fill ranking array with answers from previous question
Jan, I have created a workaround to filter a ranking question that may meet your requirements. The workaround can be applied to filter and ranking on the same page or on separate pages as seen in this Demo .

Luke, we can use the two-page method for your problem. We just need to place your array on page 1 with the filter question and then add a small script to auto-check the appropriate options of the filter question and hide it. I'll get back to you with a script.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
6 years 5 months ago #59489 by janwillem64
janwillem64 replied the topic: fill ranking array with answers from previous question
Hello Tony,

Looks good!! The ranking I'm building is based on a matrix:
- item 1: yes, no, sometimes
- item 2: yes, no, sometimes

Only the yes and the sometimes items should appear in the ranking. I'm gone give it a try with your script.

Many thanks,
Jan Willem

Please Log in to join the conversation.

More
6 years 5 months ago #59491 by tpartner
tpartner replied the topic: fill ranking array with answers from previous question
Ah, that sounds exactly like what Luke is trying - "filter a ranking question by specific inputs in an array".

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
6 years 5 months ago #59504 by lsexton
lsexton replied the topic: fill ranking array with answers from previous question
Thanks for the help Tony - look forward to seeing the script

Cheers,
Luke

Please Log in to join the conversation.

More
6 years 5 months ago #59505 by tpartner
tpartner replied the topic: fill ranking array with answers from previous question
Luke, I can't remember - does array filter work with two multiple-options in 1.86? In other words, can one multiple-options filter another?

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
6 years 5 months ago #59506 by lsexton
lsexton replied the topic: fill ranking array with answers from previous question
Not sure Tony - I'll set something up and test it.

Cheers,
Luke

Please Log in to join the conversation.

More
6 years 5 months ago #59507 by lsexton
lsexton replied the topic: fill ranking array with answers from previous question
Hi Tony, array_filter doesn't appear as an option under Question Attributes for a multiple options question type in 1.86.



Cheers,
Luke

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now