Welcome to the LimeSurvey Community Forum

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

Need to show a previous (open) answer in the new question and im not able to

  • erasvg12
  • erasvg12's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 11 months ago #199782 by erasvg12
Hi, im very new in limesurvey and having the next issue:


Q1. In a survey there is a question that goes like: Which is an essential food ingredient in your house? and using it as radio question because it offers the options of NA)Not answered SPECIFY)_______________

Q2. In the last week were you able to supply yourself from _______________?

Where I need to make the input of the previous answer. In Q2 I was trying to use {Q1.shown} but there is a relevant equation that for this project I am unable to edit because we already pre setted the variable like this((Q1 == "-oth-")) to use it for other purposes and i have been asked not to modify it. The problem is that when using Q1.shown it will show me the relevant equation value "-oth" and not the previous answer.

Is there a way to fix this without changing Relevant Equation value?
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199785 by holch
.shown will give you the text that was given to the answer option.

So if you have this single choice question (first the answer code, second the name of the item):

Q1. Which animal is your favorite?

(1) Dog
(2) Cat
(3) Bird

So if the person has answered (3) Bird, then {Q1.shown} will give you "Bird" and {Q1} and {Q1.code} will both give you "3".

In your case, try Q1_other, this should work, I think (not tested). The best way to check how to access a certain part via expression manager is usually to have a look at the question logic file. This gives usually a lot of information.

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.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 11 months ago #199792 by Joffm
Hi,

I am a bit confused about your question.

When do you preset this question Q1 to "-oth-"?
Before the question? I'd understand that.

After the question?
Then you cannot expect to receive the given answer to that question later.

we already pre setted the variable like this((Q1 == "-oth-"))

And here the syntax is not correct:
To set a variable you have to use the assign operator "=" and not the comparison operator "==".

You seem to use something like Q1=="-oth" in a relevance equation to show this question only if Q1 was answered "Other (specify)".

In my opinion there is only a small misunderstanding on your side.
Therefore I'd ask you to send a sample of these relevant questions as lss export.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose