Welcome, Guest
Username: Password: Remember me

TOPIC: fill ranking array with answers from previous question

fill ranking array with answers from previous question 3 years 3 months ago #59432

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
The administrator has disabled public write access.

Re: fill ranking array with answers from previous question 3 years 3 months ago #59434

  • lsexton
  • lsexton's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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
The administrator has disabled public write access.

Re: fill ranking array with answers from previous question 3 years 3 months ago #59455

  • lsexton
  • lsexton's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
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!
The administrator has disabled public write access.

Re: fill ranking array with answers from previous question 3 years 3 months ago #59487

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4072
  • Thank you received: 748
  • Karma: 341
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: fill ranking array with answers from previous question 3 years 3 months ago #59489

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
The administrator has disabled public write access.

Re: fill ranking array with answers from previous question 3 years 3 months ago #59491

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4072
  • Thank you received: 748
  • Karma: 341
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: fill ranking array with answers from previous question 3 years 3 months ago #59504

  • lsexton
  • lsexton's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
Thanks for the help Tony - look forward to seeing the script

Cheers,
Luke
The administrator has disabled public write access.

Re: fill ranking array with answers from previous question 3 years 3 months ago #59505

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4072
  • Thank you received: 748
  • Karma: 341
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: fill ranking array with answers from previous question 3 years 3 months ago #59506

  • lsexton
  • lsexton's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
Not sure Tony - I'll set something up and test it.

Cheers,
Luke
The administrator has disabled public write access.

Re: fill ranking array with answers from previous question 3 years 3 months ago #59507

  • lsexton
  • lsexton's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 8
  • Karma: 0
Hi Tony, array_filter doesn't appear as an option under Question Attributes for a multiple options question type in 1.86.



Cheers,
Luke
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.139 seconds
Donation Image