Welcome to the LimeSurvey Community Forum

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

Display Array question responses in basic admin notification email

  • korneliadobrawa
  • korneliadobrawa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 months 6 days ago #266426 by korneliadobrawa
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Cloud   Version 6.6.1
Own server or LimeSurvey hosting:
Survey theme/template:
==================Dear Community,I am trying to include the answers to an array question in the basic admin notification email that will be sent to respondents after they complete the survey. However, I am unable to access the array question and responses using the question code (other kinds of questions work for me).I would greatly appreciate your assistance!Thank you in advance!Best regards,
Kornelia
 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 months 6 days ago - 4 months 6 days ago #266428 by Joffm
In questions with subquestions you have to use
array, multiple questions 
{QCode_SQCode}
array(numbers), array(text)
{QCode_SQCodeY_SQCodeX}
array dual scale
{QCode_SQCode_ScaleID}

Read the manual for further explanations 

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 months 6 days ago by Joffm.
The following user(s) said Thank You: korneliadobrawa

Please Log in to join the conversation.

  • korneliadobrawa
  • korneliadobrawa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 months 6 days ago #266429 by korneliadobrawa
Thank you very much Joffm!

My current entry looks like this:

{G01Q01_SQ001.question}       {G01Q01_SQ001_AO01}

{G01Q01_SQ002.question}       {G01Q01_SQ002_AO02}

{G01Q01_SQ003.question}       {G01Q01_SQ003_AO03}

{G01Q01_SQ004.question}       {G01Q01_SQ004_AO01}

{G01Q01_SQ005.question}       {G01Q01_SQ005_AO02}

{G01Q01_SQ006.question}       {G01Q01_SQ006_AO03}

{G01Q01_SQ007.question}       {G01Q01_SQ007_AO01}

{G01Q01_SQ010.question}       {G01Q01_SQ010_AO02}

{G01Q01_SQ009.question}       {G01Q01_SQ009_AO03}

and this is the result in the email when the email is sent:

9th September, 9 am-09.45am G01Q01_SQ001_AO01
9th September, 3 pm-3.45pm G01Q01_SQ002_AO02
9th September, 7 pm-7.45pm G01Q01_SQ003_AO03
10th September, 9 am-09.45am G01Q01_SQ004_AO01
10th September, 3 pm-3.45pm G01Q01_SQ005_AO02
10th September, 7 pm-7.45pm G01Q01_SQ006_AO03
11th September, 9 am-09.45am G01Q01_SQ007_AO01
11th September, 3 pm-3.45pm G01Q01_SQ010_AO02
11th September, 7 pm-7.45pm G01Q01_SQ009_AO03


Is there a way to fix the secound part? Instead of G01Q01_SQ00x_AO0x, there should be a language.

Maybe you have also an idea how to optimize this question?

Thank you in advance!

Best,
Kornelia

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 months 6 days ago #266431 by Joffm
G01Q01_SQ001_AO01
Look like an array?

I wrote
array, multiple questions 
{QCode_SQCode}

So, {G01Q01_SQ001} will return the code of the answer option, e.g. "AO02"
As written in the manual
If you want to display the text, you have to use "shown"

Manual:
[url] www.limesurvey.org/manual/ExpressionScri...#Access_to_variables [/url]

[url] www.limesurvey.org/manual/ExpressionScri...code_variable_naming [/url]

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: korneliadobrawa

Please Log in to join the conversation.

  • korneliadobrawa
  • korneliadobrawa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 months 6 days ago #266433 by korneliadobrawa
Thank you, it worked!

But now all the possible dates are listed in the email:

9th September, 9 am-09.45am English
9th September, 3 pm-3.45pm English
9th September, 7 pm-7.45pm English
10th September, 9 am-09.45am
10th September, 3 pm-3.45pm
10th September, 7 pm-7.45pm
11th September, 9 am-09.45am
11th September, 3 pm-3.45pm
11th September, 7 pm-7.45pm

although only the first 3 dates were chosen.

Can this be optimized somehow that only these choices will be listed that the participant choose?

Thank you!

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 months 5 days ago #266437 by Joffm
Yes, obviously.
You have to check before if it is chosen.

You never showed anything - neither the question type nor your desired result nor what you really entered as expression.

So send the lss export that we have a better idea.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: korneliadobrawa

Please Log in to join the conversation.

  • korneliadobrawa
  • korneliadobrawa's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 months 5 days ago #266439 by korneliadobrawa
Sure! I attached the export of the question. 

The survey should be a registration form for a webinar and I would like that after the respondents fill in the survey they get the admin basic notification email in which they will get the summary of what they entered as they registered such that they can check which date and time they wanted to attend. 

Thanks a lot for your help! 

Best,
Kornelia 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 months 5 days ago #266440 by Joffm
Please, neither *.lsq nor *.lsg exports, only *.lss

Joffm

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

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose