- Posts: 36
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
piping subquestions from array based on response
- rvenkat
- Topic Author
- Offline
- Junior Member
Less
More
6 years 3 months ago #161194
by rvenkat
piping subquestions from array based on response was created by rvenkat
(I posted this earlier in the wrong section of the forum. My apologies.)
I have an array with 5 subquestions with a 1-10 scale for answer choices. If someone selects a value of 6 or below on one or more of the subquestions, I want to present a multiple short text with the same subquestions. For those who select values of 7 or above for all 5 subquestions in the array, they will not see this followup question.
I can handle it if there is only one question on a 1-10 scale, but I have 5 in this case and I can't just to a short text as a followup. It has to be a multiple short text.
Please let me know if you have any suggestions.
Thank you very much.
rvenkat
I have an array with 5 subquestions with a 1-10 scale for answer choices. If someone selects a value of 6 or below on one or more of the subquestions, I want to present a multiple short text with the same subquestions. For those who select values of 7 or above for all 5 subquestions in the array, they will not see this followup question.
I can handle it if there is only one question on a 1-10 scale, but I have 5 in this case and I can't just to a short text as a followup. It has to be a multiple short text.
Please let me know if you have any suggestions.
Thank you very much.
rvenkat
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
6 years 3 months ago #161202
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 subquestions from array based on response
Do you have a little example survey? Just upload a LSS file only with the relevant section and we can have a look at it.
You need to find the correct way on how to address the subquestions in the subquestion relevance.
Usually it is something like:
"questioncode_subquestioncode"
Not sure if the multipe short text question type has subquestion relevance. Would need to check.
You need to find the correct way on how to address the subquestions in the subquestion relevance.
Usually it is something like:
"questioncode_subquestioncode"
Not sure if the multipe short text question type has subquestion relevance. Would need to check.
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: rvenkat
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
6 years 3 months ago - 6 years 3 months ago #161207
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic piping subquestions from array based on response
Regarding the Q2 sub-question relevance, I would think they should look something like this:
As for the Q2 question relevance, I would like to use sumifop but I find it buggy so you can do it "long-hand":
Sample survey attached:
Code:
!is_empty(Q1_SQ001) AND Q1_SQ001 < 7
As for the Q2 question relevance, I would like to use sumifop but I find it buggy so you can do it "long-hand":
Code:
sum(!is_empty(Q1_SQ001) AND Q1_SQ001 < 7, !is_empty(Q1_SQ002) AND Q1_SQ002 < 7, !is_empty(Q1_SQ003) AND Q1_SQ003 < 7, !is_empty(Q1_SQ004) AND Q1_SQ004 < 7, !is_empty(Q1_SQ005) AND Q1_SQ005 < 7) > 0
Sample survey attached:
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
Last edit: 6 years 3 months ago by tpartner.
The following user(s) said Thank You: rvenkat
The topic has been locked.
- rvenkat
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 36
- Thank you received: 0
6 years 3 months ago #161233
by rvenkat
Replied by rvenkat on topic piping subquestions from array based on response
Hi Tony,
Thank you so much. The solution worked perfectly.
rvenkat
Thank you so much. The solution worked perfectly.
rvenkat
The topic has been locked.