Welcome to the LimeSurvey Community Forum

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

array filter exclusion and Array filter

More
6 years 1 month ago #164870 by asaha
Hi,

I am trying to apply array filter or Array filter exclusion from a radio question to Array question, but not having success.

The answers are in s4, and I want to apply array filter in c6 and array filter exclusion in c7 based on answers on s4
similarly from answeers in c5 i want to apply array filter to c6a and array filter exclusion to c7a.

I am attaching my LSS if someone can share help.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago #164872 by Joffm
Replied by Joffm on topic array filter exclusion and Array filter
Well,
s4 is a single punch question, there is no array filter.
You can insert into the subquestion relevance of c6:
Sky: s4==1
Virgin: s4==2
...

And for the exclusion:
s4!=1
s4!=2
...

c5 is a matrix.
So which answer option shall be included in the array filter?
Again use subquestion relevance:
Let's say: people who answer "Yes" are included
In c6a:
Netflix: c5_14=="Y"
...


Here is what the manual says about array filter:

Array exclusion filter (array_filter_exclude)

Description

The Array filter exclusion setting allows you to use any multiple choice question to select or set which responses are NOT displayed in a subsequent list, array or multiple choice question.
The subsequent questions can be filtered on any array question type, including:

Multiple choice
Multiple choice with comments
Multiple short text
Multiple numeric
Array (5 point, 10 point, Yes/No/Unknown, Increase/Same/Decrease, Column)
Array (Dual Scale, Text, Numbers)
Ranking

Furthermore, each of these types of questions can filtered.
The only exception is Array (Column), which can filter other questions, but can not itself be filtered.

How to set it up

Enter the question code of a multiple options question in the array exclusion filter box of the question you are currently editing. The respective question will be used as the source of information for the current question, the non-selected answers from the previous question being retrieved and used as answer options for the current question. For example, if your source multiple option question code is "Q1", enter "Q1" into the 'Array exclusion filter' box to start the filtering process of the answers. Only the answer options that are NOT selected in question Q1 will be visible in your question.


And this is the way you could do it with array filter:
Create a multiple question similar to s4.
By an equation fill this question with the answer of s4.
Now you can use it as filter.


I always advice to import and study the sample surveys:
manual.limesurvey.org/Expression_Manager_Sample_Surveys

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
6 years 1 month ago #164873 by asaha
Replied by asaha on topic array filter exclusion and Array filter
Thanks for the quick reply Joff, got the above, and i get that.
Just to confirm for Array filter exclusion on c7a i shoudl use something like this
In c7a:
Netflix: c5_14!=="Y"
The topic has been locked.
More
6 years 1 month ago #164875 by asaha
Replied by asaha on topic array filter exclusion and Array filter
similarily when I trying to apply array filter exclusion in St1b OR St1ca (radio questions) from S4, i don't seem to have a place to apply relevance. Any suggestions what i could do there
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago - 6 years 1 month ago #164882 by Joffm
Replied by Joffm on topic array filter exclusion and Array filter

In c7a:
Netflix: c5_14!=="Y"

Equal: "=="
Not equal: "!="

similarily when I trying to apply array filter exclusion in St1b OR St1ca (radio questions) from S4 ...

Of course not.
St1b is single punch.
There is no subquestion relevance.

Workaround; As said before. Create a multiple question like s4, (MS4)
By equation (eqMS4) check the answer:
{MS4_SQ001=if(S4 == 1, "Y", "")}
{MS4_SQ002=if(S4 == 2, "Y", "")}
{MS4_SQ003=if(S4 == 3, "Y", "")}
...

Afterwards you can use MS4 as array filter.

Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 years 1 month ago by Joffm.
The topic has been locked.
More
6 years 1 month ago #164908 by asaha
Replied by asaha on topic array filter exclusion and Array filter

File Attachment:

File Name: limesurvey...1451.lss
File Size:250 KB


HI Joff,
Thanks for the support so far. I have managed to make C6 & C7 work, however still stuck with St1b

I have created a new multi select question hids4, where i am trying to punch in the response from s4. ( the latest export of survey is attached)

it looks like being a very novice user, I am making some basic mistake or not understanding something fundamental in the logic. if you have any step by step instructions, or could send me an example of how you would construct the same logic using 3 such questions that will be great, and very helpful.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago - 6 years 1 month ago #164924 by Joffm
Replied by Joffm on topic array filter exclusion and Array filter
Hi, small example.

File Attachment:

File Name: limesurvey...5154.lss
File Size:0 KB


I saw some mistakes around s4:

{eqhidS4=if((s4.NAOK=="A1"),'1','2')}

s4 has no answer option "A1"; s4 has answer options 1,2,3,...

hidS4: that was a misunderstanding on your side.

Joffm

And always remember:
To use array filter: Both questions have to have exactly the same answer options.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 years 1 month ago by Joffm.
The topic has been locked.
More
6 years 1 month ago #164930 by asaha
Replied by asaha on topic array filter exclusion and Array filter
Hi Joff,

Thanks , could you please send the LSS again, it didn't come through right. shows 0KB, and can't be imported
The topic has been locked.
More
6 years 1 month ago #164932 by asaha
Replied by asaha on topic array filter exclusion and Array filter
I am using 2 questions after s4.
eqhids4
&
hids4

I am using eqhids4 to punch a quota of specific TV users vs non users from S4.

I added hids4 for create the multiple question solution you previously suggested. so trying to add relevance there, and then use hids4 to array filter questions like st1b,st1d,st1f etc.

the LSS file you sent as an example seems to be corrupt, so if you could send that again as well please.

thanks for looking into this and your support so far. excluding answer options from S4 into questions like st1b, st1d seems to be the last blocker i need to overcome.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 1 month ago - 6 years 1 month ago #164934 by Joffm
Replied by Joffm on topic array filter exclusion and Array filter
ok, sent again.

File Attachment:

File Name: limesurvey...3-03.lss
File Size:25 KB


If you still can't import it, I will sent a written manual for these four simple questions.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 6 years 1 month ago by Joffm.
The topic has been locked.
More
6 years 1 month ago #164936 by asaha
Replied by asaha on topic array filter exclusion and Array filter
Hi Joff,

Thanks for the LSS. I have managed to replicate, and make the questions work.

Thanks a lot for your help, specially on a weekend!
All the best
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose