Check out the LimeSurvey source code on GitHub!

fill ranking array with answers from previous question

More
5 years 10 months ago #59432 by janwillem64
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
5 years 10 months ago #59434 by lsexton
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
5 years 10 months ago #59455 by lsexton
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
5 years 10 months ago #59487 by tpartner
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
5 years 10 months ago #59489 by janwillem64
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
5 years 10 months ago #59491 by tpartner
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
5 years 10 months ago #59504 by lsexton
Thanks for the help Tony - look forward to seeing the script

Cheers,
Luke

Please Log in to join the conversation.

More
5 years 10 months ago #59505 by tpartner
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
5 years 10 months ago #59506 by lsexton
Not sure Tony - I'll set something up and test it.

Cheers,
Luke

Please Log in to join the conversation.

More
5 years 10 months ago #59507 by lsexton
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.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form