Welcome to the LimeSurvey Community Forum

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

Piping from Array to Array

  • mamu_lb
  • mamu_lb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 5 months ago #190843 by mamu_lb
Piping from Array to Array was created by mamu_lb
Dear all,

I am stuck with something which should work, but either my brain is not properly processing what I read or I am somehow blind and do not see my mistake.

I have a first question of type array (Participation01) with 8 subquestions and 2 answer options (Yes/no)
I have a second question of typ array (Participation03) with the same 8 subquestions and 2 other answer options (In my city / Somewhere else)

Now what I want to happen is that:
For every subquestion of (Participation01) where the answer is YES I want that answer option to appear in (Participation03). The others where the respondent said NO should not anymore appear in (Participation03).

I tried with relevance equation:
Code:
(Participation01_SQ001.NAOK == "A1") OR (Participation01_SQ002.NAOK == "A1") OR (Participation01_SQ003.NAOK == "A1") OR (Participation01_SQ004.NAOK == "A1") OR (Participation01_SQ005.NAOK == "A1") OR (Participation01_SQ006.NAOK == "A1") OR (Participation01_SQ007.NAOK == "A1") OR (Participation01_SQ008.NAOK == "A1")

and Array filter exclusion
Code:
(Participation01_SQ001.NAOK == "A2") OR (Participation01_SQ002.NAOK == "A2") OR (Participation01_SQ003.NAOK == "A2") OR (Participation01_SQ004.NAOK == "A2") OR (Participation01_SQ005.NAOK == "A2") OR (Participation01_SQ006.NAOK == "A2") OR (Participation01_SQ007.NAOK == "A2") OR (Participation01_SQ008.NAOK == "A2")

I attach the two .lsq for better understanding.

If someone has a clue that helps me resolve this, I would be very thankful.

Best regards
Marc

File Attachment:

File Name: limesurvey...on03.lsq
File Size:33 KB

File Attachment:

File Name: limesurvey...on01.lsq
File Size:31 KB
The topic has been locked.
  • elissa
  • elissa's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #190847 by elissa
Replied by elissa on topic Piping from Array to Array
Hi,
Instead of Array filter exclusion try to use Relevance equation for each subquestion. Press "Edit subquestions" for Participation03 then you will have a field "Relevance equation" next to each subquestion text. For the first subquestion use: Participation01_SQ001.NAOK == "A1", for the second: Participation01_SQ002.NAOK == "A1"

Cheers

Elzbieta Lesinska
LS voluntary Polish translator and supervisor
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #190848 by Joffm
Replied by Joffm on topic Piping from Array to Array
Hi, you want to have this


You have to set the subquestion relevance of the second array.
Subquestion 1, if Subquestion 1 in first array was answered "Yes", and so on.
You see, I used the codes "1=Yes, 2=No"


By the way

(Participation01_SQ001.NAOK == "A1") OR (Participation01_SQ002.NAOK == "A1") OR (Participation01_SQ003.NAOK == "A1") OR (Participation01_SQ004.NAOK == "A1") OR (Participation01_SQ005.NAOK == "A1") OR (Participation01_SQ006.NAOK == "A1") OR (Participation01_SQ007.NAOK == "A1") OR (Participation01_SQ008.NAOK == "A1")

If you set this in the relevance equation of the second array, it will hide the second array completely, if no subquestion was answered "Yes".

Best regards
Joffm


And please, never send lsq or lsg exports, always lss.

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • mamu_lb
  • mamu_lb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 5 months ago #190851 by mamu_lb
Replied by mamu_lb on topic Piping from Array to Array
Thank you elissa for your reply.
It was exactly what I was looking for.
I somehow had the code but was in the wrong spot
A headache less before the weekend.
The topic has been locked.
  • mamu_lb
  • mamu_lb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 5 months ago #190852 by mamu_lb
Replied by mamu_lb on topic Piping from Array to Array
Thank you Joffm for your reply.
Yes It was exactly what I was looking for. And thank you for all your effort with the screenshot
I somehow had the code but was in the wrong spot
A headache less before the weekend.

As for the relevance equation. Yes that is the intention. If respondents answer NO to all subquestions of Participation01 they are redirected to another question and should not see this one (Participation03).
But thanks for pointing it out.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 5 months ago #190860 by holch
Replied by holch on topic Piping from Array to Array
By the way, next time, please provide a LSS file, not LSQ files. This helps the helpers in the forum, as they do not need to create a survey and a question group for them to import your LSQ files to.

It is a little bit more work for you (copy your survey, delete the unnecessary parts, export it to LSS), but it reduces the effort and time for the helpers in the forum.

Also, in some cases, the general settings of the survey might also be important for the understanding of your case (here this was not the case, but it is also an argument pro LSS file, instead of LSQ or LSG).

Help us to help you. ;-)

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

The topic has been locked.
  • mamu_lb
  • mamu_lb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 5 months ago #190867 by mamu_lb
Replied by mamu_lb on topic Piping from Array to Array
Thanks holch
always glad to hear how I can improve. Duly noted for a next question
Best
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose