- Posts: 185
- Thank you received: 11
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Show array sub-question based on previous multiple-choice
- bulgin
- Topic Author
- Offline
- Elite Member
Less
More
4 years 8 months ago #187742
by bulgin
Show array sub-question based on previous multiple-choice was created by bulgin
Hello, I'm trying to show/not show an array sub-question based on a choice in a previous multiple (not array) question.
I viewed a solution here:
www.limesurvey.org/forum/can-i-do-this-w...ed-on-previous-array
but this only seems to be between two arrays - I first have a multiple choice and later, an array. Don't know what solution would work here.
I viewed a solution here:
www.limesurvey.org/forum/can-i-do-this-w...ed-on-previous-array
but this only seems to be between two arrays - I first have a multiple choice and later, an array. Don't know what solution would work here.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12886
- Thank you received: 3965
4 years 8 months ago #187743
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Show array sub-question based on previous multiple-choice
Hi,
either use array filter
manual.limesurvey.org/Question_type_-_Ar...r_.28array_filter.29
or subquestion relevance
Joffm
either use array filter
manual.limesurvey.org/Question_type_-_Ar...r_.28array_filter.29
or subquestion relevance
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- bulgin
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 185
- Thank you received: 11
4 years 8 months ago - 4 years 8 months ago #187745
by bulgin
Replied by bulgin on topic Show array sub-question based on previous multiple-choice
So I have:
An array question with a Group ID of 82 and a Question ID of 411 and sub-question SQ06, and a relevance question for it from a multiple choice question with a Group ID of 0 and a Question ID 521 with possible choices A1 or A2 or A3.
None of the following inputs into the relevance field for the array question 411 sub-question SQ06 produces any effect:
!is_empty(521) AND 521 !='A1'
521_A1 != 'A1'
Question 411 sub-question SQ06 shows along with all other sub-questions, regardless.
An array question with a Group ID of 82 and a Question ID of 411 and sub-question SQ06, and a relevance question for it from a multiple choice question with a Group ID of 0 and a Question ID 521 with possible choices A1 or A2 or A3.
None of the following inputs into the relevance field for the array question 411 sub-question SQ06 produces any effect:
!is_empty(521) AND 521 !='A1'
521_A1 != 'A1'
Question 411 sub-question SQ06 shows along with all other sub-questions, regardless.
Last edit: 4 years 8 months ago by bulgin. Reason: correction
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
4 years 8 months ago #187746
by jelo
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Show array sub-question based on previous multiple-choice
Please create a LSS export with the relevant questions.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12886
- Thank you received: 3965
4 years 8 months ago - 4 years 8 months ago #187747
by Joffm
As explained in the manual: In EM you use the question code, not the question ID.
Furthermore you say the subquestion has a code of SQ06. So "521_A1" is absolutely wrong.
Read here
manual.limesurvey.org/Expression_Manager...code_variable_naming
Joffm
Please, read the manual and study the sample surveys which you find here
manual.limesurvey.org/Expression_Manager_sample_surveys
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Show array sub-question based on previous multiple-choice
!is_empty(521) AND 521 !='A1'
521_A1 != 'A1'
As explained in the manual: In EM you use the question code, not the question ID.
Furthermore you say the subquestion has a code of SQ06. So "521_A1" is absolutely wrong.
Read here
manual.limesurvey.org/Expression_Manager...code_variable_naming
Joffm
Please, read the manual and study the sample surveys which you find here
manual.limesurvey.org/Expression_Manager_sample_surveys
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 8 months ago by Joffm.
The topic has been locked.
- bulgin
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 185
- Thank you received: 11
4 years 8 months ago #187749
by bulgin
Replied by bulgin on topic Show array sub-question based on previous multiple-choice
Ah! Code not ID - I should've seen that. Thanks for clearing that up. It seems to work now. Have a great day!
The topic has been locked.