Welcome to the LimeSurvey Community Forum

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

Show unselected subquestions

  • develnick
  • develnick's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 2 months ago - 5 years 2 months ago #178920 by develnick
Show unselected subquestions was created by develnick
Hello, I have a long multiple-choice question as follow:

Reference:
[✔] the user choose a document


Question Q: Choose the avaiable documents.
  • 01: Document 1
  • 02: Document 2
  • 03: Document 3 [✔]
  • ...
  • q_99: Document 99


What is the code to show unselected documents? The expected behavior is:

Thank you for your selection. You didn't select those documents: Document 1, Document 2, Document 99


I tried to use this code:
Code:
{if(Q_0N == 'Y',"","{Q_0N.question}")}

but the result is that:

Thank you for your selection. You didn't select those documents: {Q_01.question}, {Q_02.question}, {Q_0N.question}



This approach works only if I put the question text manually:
Code:
{if(Q_0N == 'Y',"","You didn't select those documents: document N")}

- Nick
Last edit: 5 years 2 months ago by develnick.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 months ago #178921 by holch
Replied by holch on topic Show unselected subquestions
You probably will have to check the subquestions one by one. I don't think that there is an array with unchecked subquestions.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • develnick
  • develnick's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 2 months ago #178925 by develnick
Replied by develnick on topic Show unselected subquestions
Ok I understand; thanks for your answer. However do you know what is the code to show unchecked subquestion? Because this one:
Code:
{if(Q_0N == 'Y',"","{Q_0N.question}")}

does not work.

If I run this code, it ends with showing {Q_0N.question} including the {} parenthesis.
Thanks for your time again!

- Nick
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 months ago #178929 by tpartner
Replied by tpartner on topic Show unselected subquestions
You have misplaced parenthesis and quotes.

Code:
{if(Q_0N == 'Y', "", Q_0N.question)}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 months ago #178931 by holch
Replied by holch on topic Show unselected subquestions
What tpartner says!

What is put between " is considered a string, so Expression Manager did the right thing and wrote exactly that.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • develnick
  • develnick's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 2 months ago #178946 by develnick
Replied by develnick on topic Show unselected subquestions
Thank you very much. That solved my issue

- Nick
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose