Welcome to the LimeSurvey Community Forum

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

Based on the answer on Q1, show specific answers on Q2

  • mooviereel
  • mooviereel's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 weeks 1 hour ago #269735 by mooviereel
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Community Edition Version 6.12.0+250310 
Own server or LimeSurvey hosting: own server
Survey theme/template:
==================
Hello all!
I have been using Limesurvey for very basic functions, so I had no problem creating surveys. I have encountered the following scenario, and I would like to request some assistance:

Q1 (radio button - one option) will ask if the user is "biological male", "biological female" or "intersex". If the user selects "biological male", then, Q2 will offer the following options "social male", biological male". If the user selects "biological female", then Q2 will offer the following options "social female", "biological female". Only one answer is permitted in Q2.

I read about arrays, but I have problems with the following concept: the user needs to select ONLY one option for Q2.

Do you have any suggestions?
Thank you in advance

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 6 days ago #269739 by holch
Q2 is not an array question, but a list radio type question. However, there is no relevance equation on a answer option basis, only for subquestions. List (radio) has only answer options. So now you have two options to solve this.

First the simple one: Create two Q2s, one Q2a for the male part, one Q2b for the female part and use the relevance equations on the question level to show/hide the respective version of Q2.

The complicated part allows you to keep all the answer options in just one list(radio) question, but it requires two hidden questions. One hidden multipe response question with the 4 options and one hidden equation type question that will set the correct options in the hidden multiple response question, which then is used as a base for an array filter on Q2, to only show the two options that are relevant.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The following user(s) said Thank You: mooviereel

Please Log in to join the conversation.

  • mooviereel
  • mooviereel's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 6 days ago #269744 by mooviereel
Thank you Holch!

Branching Q2 is one of the options I considered, but I am bit wary of doing it, as it will mess the statistics (I will be exporting the answers for SPSS processing).
The hidden questions solution, although complicated, will help me down the road, and keep my data more organized.

So, the overview would be:

Q1 (radio - single choice) ->
Q2a (hidden, equation) -> will take the answer of Q1 and modify....
Q2b (hidden, multiple choice) select two answers on Q2b, based on the equation in Q2a ->
Q2c (radio - single choice) -> will have an array filter, that will exclude non relevant answers, based on the output of Q2b?

Sorry for repeating the workflow you're proposing, but I need to wrap my head around the logic part :)
Thank you again!

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 6 days ago #269752 by holch
Yeah, that is basically the workflow.

In the hidden equation you write a formula that will basically check the right subquestions based on which you can use the array filter for your actual Q2.

Something like {if(Q1=1,Q2b_1=="Y" AND Q2b_2=="Y",Q2b_3=="Y" AND Q2b_4=="Y")}

This is not tested, just an idea of what the foruma in the hidden equation would look like, more or less. Of course, you need to adapt to your question, subquestion and answer codes in your survey.

Create a little test sample and play around. If you run into any trouble, export the sample with those 4 questions and upload it as an LSS here.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The following user(s) said Thank You: mooviereel

Please Log in to join the conversation.

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 week 6 days ago #269753 by holch
but branching is also not a big deal. You can always reorganize the data in SPSS and merge Q2a and Q2b, just already use different answer options, e.g. 1 and 2 in Q2a and in Q2b you use 3 and 4. Then you just merge `the two questions (because one is always empty if you do it right) and you have a Q2c that will give you the same thing. Not an SPSS expert, but that should take more than a couple of minutes. So it is up to you how you would like to proceed.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The following user(s) said Thank You: mooviereel

Please Log in to join the conversation.

  • mooviereel
  • mooviereel's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 week 6 days ago #269754 by mooviereel
Thanks for the guidance!
You raise a good point in regards to SPSS, but I think I'll try the hidden question approach. I've been reading the possibilities that Expression provides, and I must admit that I am positively intrigued :)
I'll give it a go, and check back if I have any questions. 
 

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose