Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Array Filters with Drop Down Lists and Ranking Questions

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110912

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Greetings,

There is plenty of documentation on using array filters to insert answers from previous questions into subsequent ones. In the manual, it lists all the source questions that can be used to do this. However, drop down lists are not one of the question types listed.

The subsequent question I am using is Rankings. So, my question is if there is a way to have selected answers from drop down lists appear in the sub questions of the ranking question using array filters?

The second part of this question is if there is a way to have answers only from questions actually answered appear in the 'Your Choices' sub question list of the ranking question?

Within the question group, there are six possible answers that can appear in the ranking question. Only the first is mandatory, and the other five are optional. There is no need to rank one answer, as it will always be the first. So, we can hide the question using conditions unless a second question is answered. However, at this point, there is no need to have all six options appear in the 'Your Choices' sub question list when there are only two answers to rank. So, we would want additional answers 3-6 to appear only as required if answered, if this is at all possible?

Thanks in advance.
Last Edit: 2 years 4 months ago by danika.
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110913

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Update - if you use the name of the question from drop down list questions it will display the sub question code, such as A5, for example. However, I need the string that is attached to A5 to display instead. So, now the question becomes one of how to get the string associated with this?

Any thoughts appreciated.
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110930

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6029
  • Thank you received: 373
  • Karma: 260

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The administrator has disabled public write access.
The following user(s) said Thank You: danika

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110934

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Mazi wrote:
Brilliant! Thanks, Mazi.

Any way to address the second part of this question about only showing options in the 'Your Choices' list for questions that have been answered?

Best -

Danika
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110941

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6029
  • Thank you received: 373
  • Karma: 260
danika wrote:
Any way to address the second part of this question about only showing options in the 'Your Choices' list for questions that have been answered?
Since I assume you are already using array filter I have no further ideas.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110943

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Mazi wrote:
Since I assume you are already using array filter I have no further ideas.

Perhaps I don't understand fully how it is used. I have 6 SQs (Qcode: a2-a7) holding all the aforementioned variables. Without array filters, these 6 placeholders are visible whether the questions are answered or not.

a2 is mandatory, while a3-a7 are optional. Using the array filters, if I use a2, for example, all the placeholders become visible since the first variable is entered. However, if I use a2;a3;a4; for example, none of the placeholders are visible until the variable in a4 has been entered. At this point, all remaining empty placeholders also become visible, and the user is asked to rank empty placeholders whether they answer the optional questions or not.

Am I missing something here? I doesn't seem like users should be asked to rank empty placeholders, and if I use all filters a2-a7 nothing is visible until the last variable is entered even though from a3 on the remaining questions are optional.
Last Edit: 2 years 4 months ago by danika.
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110945

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6029
  • Thank you received: 373
  • Karma: 260
Maybe you have set this up wrong? You always need to enter the QUESTION code at the array filter field, not the SUBquestion code.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110946

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Thanks, Mazi. I am using the qcodes and not the SQ codes. In the SQs for the Ranking question itself is where I am placing reference to stored variables such as {435562X2X26.shown} {435562X2X27SQ001}, for example. These were from your earlier suggestion, and work like a charm. But, I'm afraid on the array filters using Qcodes it is an all or nothing proposition as far as the ranking question goes.

I know that I've seen this work with other array-type questions as you would expect it to. No joy on the Ranking question though.
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110947

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Here are two screen shots. The first is of the SQs on the ranking question. The second is the array filter with Qcodes for the questions to be ranked. The Qcodes a2, etc. are not to be confused with SQ codes A2, etc. They are from separate questions.




Last Edit: 2 years 4 months ago by danika.
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110951

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6029
  • Thank you received: 373
  • Karma: 260
The only weird setting I can see is the last ";" at the "Array filter".

If the common array filter approach doesn't work for ranking questions, please file a bug report.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110953

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Thanks, Mazi. I was working on documenting that right now, as a matter of fact. I've may also have found another fully qualified bug, and I use the term sparingly.

Using conditions, I've actually been able to break the cascading logic of the question group. Seems that placing a default answer in the drop down list box breaks the conditional IF logic to show or hide the next question. I am trying other IF/AND or other options to see if this can be resolved. If not, I will follow up with bug report on that as well.

Briefly, if you place a default answer in a drop down list box of 3rd order logic, and make the next question conditional upon being NOT EQUAL TO or GREATER THAN the default answer, it shows anyway until you make your way through the survey to the question immediately preceding the conditional question. Only then it works according to the IF conditions. I can send you the question group if you are interested in having a look?
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110954

  • Mazi
  • Mazi's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 6029
  • Thank you received: 373
  • Karma: 260
If you can safely reproduce this issue with the latest version please file a bug report, attach a test survey at the Bugtracker and post the link here.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110955

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Will do.
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110962

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
Trying to set up a Boolean AND condition to see if that does not resolve the matter. But, the manual says you cannot? LS Manual


Any suggestions?
Last Edit: 2 years 4 months ago by danika.
The administrator has disabled public write access.

Array Filters with Drop Down Lists and Ranking Questions 2 years 4 months ago #110965

  • danika
  • danika's Avatar
  • Offline
  • Senior Lime
  • Posts: 53
  • Thank you received: 1
  • Karma: 0
One quick fix for this broken logic would be to edit the default strings which appear in drop down lists. I assume these strings are stored in the db. If you can tell me the table where these are stored, I could edit them and solve this problem very quickly?

Thanks
The administrator has disabled public write access.
Time to create page: 0.278 seconds
Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form