Welcome to the LimeSurvey Community Forum

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

Use an answer in another question?

  • ecottrell
  • ecottrell's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #168171 by ecottrell
Use an answer in another question? was created by ecottrell
Is there a way to show the answer a person gave of a previous question, in a new question, (in general, or specifically in LimeSurvey Pro basic account)

For example,

Question 2 is a checkbox question. In question 41 I would like to remind them of their answers to question 2 before they answer question 41. Is there a way to do that?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #168172 by holch
Replied by holch on topic Use an answer in another question?
Yes, this is possible. You need to use the Expression manager to pipe answers to previous questions into a later question. I assume with checkbox question you mean a multiple answer question? Those are a little trickier to work with, because you need to check every answer option, if it has been checked or not. Single answer questions are easier, as you can just output the answer that was chosen.

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: ecottrell
The topic has been locked.
  • ecottrell
  • ecottrell's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #168179 by ecottrell
Replied by ecottrell on topic Use an answer in another question?
I will play around with the expression manager! I wasn't sure where to look. Thank you :). It is a multiple answer question. There's like... 30 different options and people can be any combination of the 30. I foresee tedious work in my future :)
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #168180 by holch
Replied by holch on topic Use an answer in another question?
Well, you can always create something like that:

{if(questioncode_answercode1=="Y", "Answer 1", "")}
{if(questioncode_answercode2=="Y", "Answer 2", "")}
etc.

and copy this for all 30 answers. Depends a little on what you want to show in the follow up question. If you can put an example survey (export a LSS file with only the two questions that we are talking about), we can have a look at it and maybe give some suggestions.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • ecottrell
  • ecottrell's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #168185 by ecottrell
Replied by ecottrell on topic Use an answer in another question?
I *think* I did the lss correctly (I just created a new survey as a test, with the two questions). The second question is in a different section and at the end of the survey, I want to be able to remind participants what they selected at the beginning of the survey as a refresher (since it is a pretty long survey).

Thank you so much for your help, I really appreciate it. I used Limesurvey in my undergraduate degree because our university had access to it, but it's been a year and it looks different (I'm at a different school now for my Masters, so I had to get my own account which may be why it looks different) so it's taking some relearning.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 6 months ago #168192 by Joffm
Replied by Joffm on topic Use an answer in another question?
To display the answers of Q1, comma separated, just enter

{list(that.Q1.shown)}





To understand, please read the manual, especially:
www.limesurvey.org/manual/Expression_Man....27that.27_variables

www.limesurvey.org/manual/Expression_Man...mplemented_Functions

www.limesurvey.org/manual/Expression_Man...#Access_to_Variables

And please send a *.lss file, not something else, like a *.zip file.

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • ecottrell
  • ecottrell's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 6 months ago #168199 by ecottrell
Replied by ecottrell on topic Use an answer in another question?
Thank you! When I was looking through the manual I misunderstood that as it would show the subquestions options again, not the answers they selected. That is perfect. I appreciate your help!
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose