- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Piping from Array to Array
- mamu_lb
- Topic Author
- Offline
- New Member
Less
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:
and Array filter exclusion
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
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
Attachments:
The topic has been locked.
- elissa
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 193
- Thank you received: 69
4 years 5 months ago #190847
by elissa
Elzbieta Lesinska
LS voluntary Polish translator and supervisor
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
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12908
- Thank you received: 3970
4 years 5 months ago #190848
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
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
Best regards
Joffm
And please, never send lsq or lsg exports, always lss.
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
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".(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")
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
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.
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
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.
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11645
- Thank you received: 2738
4 years 5 months ago #190860
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
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.
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
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
always glad to hear how I can improve. Duly noted for a next question
Best
The topic has been locked.