Welcome, Guest
Username: Password: Remember me

TOPIC: Array filter with exclusive option

Re:Array filter with exclusive option 3 years 4 months ago #58669

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4062
  • Thank you received: 742
  • Karma: 341
I think you have an error in another script preventing mine from running - I do not use "document.getElementById".

Can you activate a sample survey for us to test?
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:Array filter with exclusive option 3 years 4 months ago #58670

  • arielmosto
  • arielmosto's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 29
  • Karma: 0
The administrator has disabled public write access.

Re:Array filter with exclusive option 3 years 4 months ago #58696

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4062
  • Thank you received: 742
  • Karma: 341
I see no JS errors and the script appears to work in both Firefox and IE.
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:Array filter with exclusive option 3 years 4 months ago #58716

  • arielmosto
  • arielmosto's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 29
  • Karma: 0
Thank you very much Tony. I did the sample from Ubuntu and I could not test Internet Explorer to realize that it was working perfect. Then delete the questions that did not work in the original survey, we did back and now everything works correctly in FF, Chrome, IE 6, IE 7 and IE 8. Thank you very much for your help! Ariel
The administrator has disabled public write access.

Re:Array filter with exclusive option 1 month 2 days ago #110285

  • dknvs
  • dknvs's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
Hi, Tony
I have a similar issue but the codes that are posted in the forum don't seem to work for my case. I am wondering if you could help me with ediiting the JS codes?

So here is the background for the survey:
We have two multiple select questions. what i select for Q1 will pipe for Q2. People who select "don't know" at Q1 won't see Q2.However, i would like to show "Don't know" for Q2. For the current setting right now, "Don't know" and "Other, please specify" are not showing.

Question 1 (Code Q1) (multiple select question)
1 Answer 1
2 Answer 2
3 Answer 3
DK Don't know (exclusion option)
**Exclusion option:DK


Question2 (Code Q2) (another multiple select question)
1 Answer 1
2 Answer 2
3 Answer 3
Other, please specify
DK Don't know (exclusion option)
**Relevance equation:
((Q1_1.NAOK == "Y" or Q1_2.NAOK == "Y" or Q1_3.NAOK == "Y"))
**Array filter: Q1
**Exclusion option: DK

Thank you so much!

Vicky
The administrator has disabled public write access.

Re:Array filter with exclusive option 1 month 1 day ago #110289

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4062
  • Thank you received: 742
  • Karma: 341
If I understand the requirements correctly, this should do the trick. Use a different code for "Don't know" in Q2 and a slightly different relevance equation for Q2.

Question 1 (Code Q1) (multiple select question)
1 Answer 1
2 Answer 2
3 Answer 3
DK Don't know (exclusion option)
**Exclusion option:DK


Question2 (Code Q2) (another multiple select question)
1 Answer 1
2 Answer 2
3 Answer 3
DK2 Don't know (exclusion option)
Other, please specify
**Relevance equation: Q1_DK != 'Y'
**Array filter: Q1
**Exclusion option: DK2

File Attachment:

File Name: limesurvey_survey_926833.lss
File Size: 23 KB


.
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:Array filter with exclusive option 1 month 1 day ago #110290

  • dknvs
  • dknvs's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
Hi, Tony
thanks for your fast reply.
for our calculation on the site, the "DK" code is set if we want to exclude that from the calculation.
Would there be a way for me to keep that code?

thanks
Vicky
The administrator has disabled public write access.

Re:Array filter with exclusive option 1 month 1 day ago #110292

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4062
  • Thank you received: 742
  • Karma: 341
No, that will tie it to the array filter from Q1. The array filters work on sub-question codes.
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:Array filter with exclusive option 1 month 1 day ago #110293

  • dknvs
  • dknvs's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
the "other, please specify" for Q2 still won't show...
The administrator has disabled public write access.

Re:Array filter with exclusive option 1 month 1 day ago #110295

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4062
  • Thank you received: 742
  • Karma: 341
Did you try my attached survey in LS 2.05?
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.140 seconds
Donation Image