Radio Button Variable Names for Expression Manager

More
1 month 3 weeks ago #157882 by wizard2none
wizard2none created the topic: Radio Button Variable Names for Expression Manager
Trying to find the name for variables with a radio list.

With a radio list if I have:
Question code: q4
Answer Codes: A1, A2, ...

Then what is my variable name for the Expression Manager?

I would have thought it would be q4_A1, q4_A2, etc.

But, I get "undefined variable" for {q4_A1} in the question summary.

Please Log in to join the conversation.

More
1 month 3 weeks ago #157883 by holch
holch replied the topic: Radio Button Variable Names for Expression Manager
Is it really a radio list? Then it should actually be q4_A1 (please note that this is case sensitive, so make sure your question code is actually q4 and not Q4).

Can you attach a small sample survey with just the questions that are relevant?

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
1 month 3 weeks ago - 1 month 3 weeks ago #157886 by wizard2none
wizard2none replied the topic: Radio Button Variable Names for Expression Manager
I have created a simple survey to show my confusion.

First question (q1) is radio list with two choices A1, A2.

The second question is text display which attempts to show the values of the variable from the first question:
{q1_A1} and {q1_A2}
Attachments:
Last Edit: 1 month 3 weeks ago by wizard2none. Reason: Correction

Please Log in to join the conversation.

More
1 month 3 weeks ago #157892 by holch
holch replied the topic: Radio Button Variable Names for Expression Manager
Ohh, I got this wrong.

For a list radio there are no variables q1_A1, q1_A2. This only exists for subquestions. In list radio you only have answer options. So q1 is either A1 or A2 as a result.

So you need to put {q1} and it will give you A1 or A2 as a result. That is why you get this error message.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
The following user(s) said Thank You: wizard2none

Please Log in to join the conversation.

More
1 month 3 weeks ago #157894 by wizard2none
wizard2none replied the topic: Radio Button Variable Names for Expression Manager
That makes sense. Guess I was too use to multiple choice questions so just assumed it followed a similar form when I couldn't figure it out from the manual.

Thanks again.

Please Log in to join the conversation.

More
1 month 3 weeks ago #157918 by tpartner
tpartner replied the topic: Radio Button Variable Names for Expression Manager
It is simply {q4}. The underscore is only used to access sub-questions as in multiple-choice or array questions.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now