Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Array filter help?

  • MysticScroll
  • MysticScroll's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months ago #143667 by MysticScroll
Array filter help? was created by MysticScroll
I have read the manual on the use of the Array filter function but it doesnt seem to be working , i have a question coded as Q6 which askes the person doing the survey to pick the catering factilities they use in an area, i wanted a follow up question to this to be How would you rate the catering factilities? with the answer options being presented in an array with the factilities they had answered in Q6 the only ones to show up in this question.

But when i put the code for Q6 into the array filter on this follow up question , nothing happend it doesnt give me the list of the factilities i picked in Q6 ( i tested this in a preview of the group these 2 questions were in.)

can anyone give me some assistance i did read the manual and done everything it said so am genuienly confused.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #143669 by tpartner
Replied by tpartner on topic Array filter help?
The sub-question codes for both questions must be identical.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: MysticScroll
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #143674 by holch
Replied by holch on topic Array filter help?
Building on tpartner's answer:

LS will not "give" you the list of chosen items from the previous question. You basically must built two questions with the same answer options / subquestions for both (and as tpartner said the codes must be the same for LS to be able to filter the array).

Then LS can compare both questions and see which where chosen in the first question and hide the not chosen codes in the second question.
manual.limesurvey.org/QS:Array_filter/en

Array filter question settings require the questions being used to have exactly matching lists of answers. If the questions do not have exactly the same set of answers and codes, then the filters will break.
Starting in 1.92, if Q2 has sub-questions that are not present in Q1, they will always be displayed rather than breaking the filters.


I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: tpartner, MysticScroll
The topic has been locked.
  • MysticScroll
  • MysticScroll's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months ago #143675 by MysticScroll
Replied by MysticScroll on topic Array filter help?
Thanks for the reply , just a quick clarification , when you mentioned the codes must be identicle , i assume you mean the ones for the answers such as this one (SQ001) in the picture below ?
gyazo.com/47c2f4781e587afaba50b7db6add70ea
The topic has been locked.
  • MysticScroll
  • MysticScroll's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months ago #143676 by MysticScroll
Replied by MysticScroll on topic Array filter help?
Thanks and am sorry i missed that in the manual i know how annoying it must be explaining things already explained i guess its all new to me so its abit overwhelming. Again thank you for your patience
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose