How to fix 'undefined variables' in LimeSurvey questions/emails?

Mehr
3 Monate 4 Wochen her - 3 Monate 4 Wochen her #191956 von Kyler_Hunter
Good Day,

I'm trying to create a custom email body by using EM . 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 when I place it in another question to check the logic. 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?

LimeSurvey Version : 3.17
Question Type: Array
Letzte Änderung: 3 Monate 4 Wochen her von Kyler_Hunter.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

LimeSurvey Partners
Mehr
3 Monate 4 Wochen her #191958 von tpartner
As far as I know, you cannot access the question text of question types that have sub-questions (array, multiple-text...), you can only access the sub-question text.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Folgende Benutzer bedankten sich: DenisChenu

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 4 Wochen her #191959 von Joffm
Yes, you are right.
P1Q1 is a question with subquestions.

Therefore {P1Q1} is not defined.

Short time ago there was already a discussion that - at the moment - you cannot get the text of the question; only the text of the subquestions.
https://www.limesurvey.org/forum/design-issues/118048-how-to-get-the-question-text-of-multiple-question

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 4 Wochen her #191960 von Kyler_Hunter
Dang, I was hoping I wouldn't have to rewrite the questions completely for the email.

How does the Answer Table pull the text then? Or is that some complicated code in the back end.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 4 Wochen her #191972 von Joffm
That's something different.
There is the table "lime_questions" in the dataset.
If you have access you may have a look.
You see that there is a field "parent_qid", where the reference between question text and subquestion text is established.

But the issue is that this access is mou published in the "access to variables"
https://manual.limesurvey.org/Expression_Manager_-_presentation#Access_to_variables

Maybe we will see it in some version in the future.

Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 4 Wochen her #191976 von Kyler_Hunter
Unfortunately I do not have access to see the back-end. Ah well, cross fingers we will be able to do it in future releases. Thanks!

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 4 Wochen her #191985 von DenisChenu

Kyler_Hunter schrieb: Unfortunately I do not have access to see the back-end. Ah well, cross fingers we will be able to do it in future releases. Thanks!

It's in 4.0 : github.com/LimeSurvey/LimeSurvey/blob/f8...orAll/config.xml#L12

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 .
Folgende Benutzer bedankten sich: tpartner

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 4 Wochen her #192001 von tpartner
@DenisChenu, nice!

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Folgende Benutzer bedankten sich: DenisChenu

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 4 Wochen her #192003 von tpartner
To expand on Denis' post, in 4.x you can activate the "expressionQuestionForAll" plugin and then an expression like {Q1.question}, where Q1 is an array, will be valid.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Folgende Benutzer bedankten sich: DenisChenu

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
3 Monate 4 Wochen her #192012 von DenisChenu

tpartner schrieb: @DenisChenu, nice!

You can be insterested by such plugin : github.com/LimeSurvey/LimeSurvey/blob/f8...pleFunctions.php#L12

I hope i found time to allow surveh plugin (expression new function) by twig ;)

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