Show unselected subquestions

More
2 months 2 weeks ago - 2 months 2 weeks ago #178920 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:
{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:
{if(Q_0N == 'Y',"","You didn't select those documents: document N")}

- Nick
Last edit: 2 months 2 weeks ago by develnick.

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
2 months 2 weeks 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'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 or Create an account to join the conversation.

More
2 months 2 weeks ago #178925 by develnick
Ok I understand; thanks for your answer. However do you know what is the code to show unchecked subquestion? Because this one:
{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

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks ago #178929 by tpartner
You have misplaced parenthesis and quotes.

{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

Please Log in or Create an account to join the conversation.

More
2 months 2 weeks 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'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 or Create an account to join the conversation.

More
2 months 2 weeks ago #178946 by develnick
Thank you very much. That solved my issue

- Nick

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!