Welcome, Guest
Username: Password: Remember me

TOPIC: problem with cascade array

problem with cascade array 2 years 1 week ago #88560

  • MIK
  • MIK's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Hello Limesurvey team!
First of all thank you for your great job!
I have a problem though. I am using version 2.00+ Build 121117 and I am trying to do what is shown in the LS2 Sample: Cascading Array Filters. Unfortunately as it was written under other version of limesurvey, I can't just copy paste all the options and get the same result. Here is why:

Q01 multiple choice
Code Subquestion
A Option A
B Option B
Option 'Other' Yes

Q02 is also multiple choice and according to the logic of cascade filter should show only options that are chosen in Q01
Option 'Other' No
Relevance equation: ((Q01_A.NAOK == "Y" or Q01_B.NAOK == "Y" or Q01_other.NAOK == "Y")
Array filter: Q01
Q02 multiple choice
Code Subquestion
A Option A
B Option B
however when I add the last line from the LS2 Sample: Cascading Array Filters which looks like
other {Q01_other}
and try to "save changes" I get the following error:
Error: 'other' is a reserved keyword.

Of course, without this line if I choose the Other option in Q01, I will not see it in the Q02, which is sad.

Please, help!
Attachments:
The administrator has disabled public write access.

Re: problem with cascade array 2 years 6 days ago #88608

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4364
  • Thank you received: 827
  • Karma: 381
I think maybe a bug.

Please file a bug report and...

1. Give as much information as possible.

2. Provide step-by-step instructions how to reproduce the problem.

3. Provide screenshots and a sample survey.

4. Post the link to the bug here so we can follow the progress.
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.
The following user(s) said Thank You: MIK

Re: problem with cascade array 2 years 5 days ago #88731

  • MIK
  • MIK's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
The administrator has disabled public write access.

Re: problem with cascade array 2 years 4 days ago #88753

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4364
  • Thank you received: 827
  • Karma: 381
The bug has been closed because "The other option is in general currently not supported for array_filter". This is unfortunate, and, in my opinion, a regression as it did work in 1.92.

A solution would be to add your own "Other" subquestion to Q01 (with a none-reserved code) and then add a following short-text conditionally shown if that option is checked.

Q02 could then be filtered on Q01.
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.
The following user(s) said Thank You: MIK

Re: problem with cascade array 2 years 4 days ago #88762

  • MIK
  • MIK's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 3
  • Karma: 0
Thank you for your reply, Tony!

Can you, please, explain in some more details what do you mean by "(with a none-reserved code)"

What I did is added an option C in Q01 and called it "Other1". If it is checked, a short text box between questions Q01 and Q02 appears. There you can edit text there, which becomes the title of the "Other1" option in Q02?

Did you mean this by "a none-reserved code"?
The administrator has disabled public write access.

Re: problem with cascade array 2 years 4 days ago #88769

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4364
  • Thank you received: 827
  • Karma: 381
Did you mean this by "a none-reserved code"?
Yep, anything except "other".
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.
The following user(s) said Thank You: MIK

Re: problem with cascade array 1 year 10 months ago #91586

  • ChengF
  • ChengF's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
Hi Tony,

Thanks for the resource. One follow up question:

How to "add a following short-text conditionally shown if that option is checked". Do you mean that I need to add another small question after Q1? If that way, the array filter cannot combine the piping from two questions tho.

Thank you!

Chengcheng
The administrator has disabled public write access.

Re: problem with cascade array 1 year 10 months ago #91647

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4364
  • Thank you received: 827
  • Karma: 381
Yes, add a short-text question after Q1 (lets call it "Q1_other_text"). Make that question conditional on Q1_Other being checked.

Then you can pipe the value of the short-text into Q2_Other:

Capture4_2013-01-23.JPG


Capture5_2013-01-23.JPG
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.
Moderators: ITEd
Time to create page: 0.153 seconds
Donation Image