Welcome to the LimeSurvey Community Forum

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

Display selected items from Multiple Choice in a later question

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 9 months ago - 4 years 9 months ago #186383 by Joffm
Hi,

if you say you are using a radio button question, your approach "Q1_A1.xxxx" is not correct.
The Q1_A1 syntax means "A1" is the code of a subquestion of Q1.

How do you imagine LimeSurvey can know the "right" answer?
A simple "if-statement" will do it.

Let's say, "A4" is the correct answer:
{if(Q1!="A4","The correct answer is: 'Option 4'","Your answer is correct")}





Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 9 months ago by Joffm.
The topic has been locked.
More
4 years 9 months ago #186396 by LCGreenAlp
Hello

Thank you again. Your example works fine.

Have a nice day


:)
The topic has been locked.
More
4 years 1 month ago #194529 by asilbering
Hi!

I need help on a related topic.

I have one multiple choice question (SSP) with many many subquestions (the number is variable but can be up to 100). I am using array filtering to display only the checked options in a subsequent array filter question (nivSSP, see sample survey attached).

The second question should only be displayed if any of the options except "non" has been checked in the first question.

Using relevance I have managed to hide the question if the option "non" is chosen. But if no option is chosen I can still see the question without any subquestions (see screen shot).

I was wondering if there is any way of saying that question two has to be displayed if any option was checked without having to list all subquestions. Using only the question code for relevance has not worked, and I don't want to have to list all subquestions in the relevance field. Am I missing something?

File Attachment:

File Name: limesurvey...5541.lss
File Size:179 KB



I hope you understand what I mean.

Thanks in advance for your help!

Best,
Ana
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago - 4 years 1 month ago #194530 by tpartner
Try this:

Code:
count(that.SSP) > 0 AND SSP_non != 'Y'

The reserved 'this', 'self', and 'that' variables - manual.limesurvey.org/Expression_Manager....27that.27_variables

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 4 years 1 month ago by tpartner.
The following user(s) said Thank You: asilbering
The topic has been locked.
More
4 years 1 month ago #194532 by asilbering
Thanks t.partner!

These functions are very useful!!

I had to use that.SSP.NAOK for it work.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose