How to fix 'undefined variables' in LimeSurvey group questions?

Mehr
4 Jahre 4 Monate her - 4 Jahre 4 Monate her #128982 von meljettweb
I may be over looking something really simple here:
How to fix 'undefined variables' in LimeSurvey group questions?
Steps to reproduce:
installed LimeSurvey Version 2.06+ Build 151109
Imported sample survey: Randomly Ask A Specific Number Of Questions In A Group (a sub-set of the questions) from here: manual.limesurvey.org/Expression_Manager..._of_the_questions.29
  1. Changing question type from 'Short free text' to 'Multiple short text'
  2. Add two sub questions and save
  3. Review survey logic under 'Question Group'
  4. Reveals error 'Undefined Variable'

Some resources reviewed:
Anhänge:
Letzte Änderung: 4 Jahre 4 Monate her von meljettweb. Begründung: further clarify question

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
4 Jahre 4 Monate her #128984 von gabrieljenik
Hmmm is your question still named Q1?

Cheers,
Gabriel - www.Encuesta.Biz - Authorized Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?)....[img]

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Jahre 4 Monate her #129039 von codelogic
If memory serves you need to change the Q1.relevanceStatus to something like this
Q1.relevanceStatus_1, Q1.relevanceStatus_2

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Jahre 4 Monate her #129076 von holch
As codelogic says, the problem is the change in question type:

Changing question type from 'Short free text' to 'Multiple short text'


For a short free text question you can access the responses with the question code alone. But if there are various responses in one question, this obviously is not enough, because Limesurvey wouldn't know which of the various responses you are trying to refer to.

So this is not a bug, you just don't access the right information. Have a look at the survey logic file, it should give you the information on how to access it. Probably something like Q1_1. relevanceStatus, etc.

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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Jahre 4 Monate her #129080 von codelogic

holch schrieb: Probably something like Q1_1. relevanceStatus, etc.


holch is right sorry my message wasn't that helpful. Check out the following link for more details.
manual.limesurvey.org/Expression_Manager...on_with_subquestions

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Jahre 3 Monate her #129089 von first
I guess this happened to me when I left a space in the question id . Something a login/logout also fix similar issue.

Survey Designer and Programmer

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Jahre 3 Monate her - 4 Jahre 3 Monate her #129157 von meljettweb
Thanks to everyone's hints, I've got the group randomization working on my survey.
:)
In case anyone needs a visual:

sum(G2Q00002_SQ001.relevanceStatus, G2Q00003_SQ001.relevanceStatus, G2Q00004_SQ001.relevanceStatus, G2Q00005_SQ001.relevanceStatus) LT 1
Letzte Änderung: 4 Jahre 3 Monate her von meljettweb. Begründung: add example

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Jahre 3 Monate her #129206 von holch
Off topic: Do you really expect to have more than 9999 questions per group or why are you reserving 5 digits for the question per group? ;-)

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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Jahre 3 Monate her #129212 von DenisChenu

holch schrieb: Off topic: Do you really expect to have more than 9999 questions per group or why are you reserving 5 digits for the question per group? ;-)

If it's a question to meljettweb : i think he used the "automatic" renumber system.

If it's for dev : don't know ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
4 Jahre 3 Monate her #129275 von holch
Question was to meljettweb, but maybe it is actually an automatic setting. In this case it makes more sense to give a little bit of more space...

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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 3 Wochen her #191949 von Kyler_Hunter
Good Day,

I'm also running into an error. I'm trying to create a specific email. My test structure is:
{P1Q1}
 - {P1Q1_SQ001.shown}

Now the answer shows just fine, but the actual question I keep getting the "undefined variable" error. If I switch to the sub-question code
P1Q1_SQ001.question
I do get the sub-question text. Any ideas why the actual question text won't show and I'm getting the "undefined variable" error?

Lime Survey Version : 3.17
Question Type: Array

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 3 Wochen her #191950 von DenisChenu

Kyler_Hunter schrieb: Good Day,

I'm also running into an error. I'm trying to create a specific email. My test structure is:

{P1Q1}
 - {P1Q1_SQ001.shown}

Now the answer shows just fine, but the actual question I keep getting the "undefined variable" error. If I switch to the sub-question code
P1Q1_SQ001.question
I do get the sub-question text. Any ideas why the actual question text won't show and I'm getting the "undefined variable" error?

Lime Survey Version : 3.17
Question Type: Array

TOTALLY unrelated to this 3 years old topic : please open a new topic.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha