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

More
1 month 2 weeks 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?

Please Log in to join the conversation.

LimeSurvey Partners
More
1 month 2 weeks 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.

Please Log in to join the conversation.

More
1 month 2 weeks 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

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now