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
  • bulgin's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 8 months ago #187742 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.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 8 months ago #187743 by Joffm
Hi,
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
  • bulgin's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 8 months ago - 4 years 8 months ago #187745 by bulgin
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.
Last edit: 4 years 8 months ago by bulgin. Reason: correction
The topic has been locked.
More
4 years 8 months ago #187746 by jelo
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
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 8 months ago - 4 years 8 months ago #187747 by Joffm

!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
  • bulgin's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
4 years 8 months ago #187749 by bulgin
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.

Lime-years ahead

Online-surveys for every purse and purpose