- Posts: 32
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Show unselected subquestions
- develnick
- Topic Author
- Offline
- Junior Member
Less
More
5 years 2 months ago - 5 years 2 months ago #178920
by develnick
- Nick
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.
What is the code to show unselected documents? The expected behavior is:
I tried to use this code:
but the result is that:
This approach works only if I put the question text manually:
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
5 years 2 months ago #178921
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
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
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 0
5 years 2 months ago #178925
by develnick
- Nick
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:
does not work.
If I run this code, it ends with showing {Q_0N.question} including the {} parenthesis.
Thanks for your time again!
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
5 years 2 months ago #178929
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11758
- Thank you received: 2753
5 years 2 months ago #178931
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
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.
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
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 0
5 years 2 months ago #178946
by develnick
- Nick
Replied by develnick on topic Show unselected subquestions
Thank you very much. That solved my issue
- Nick
The topic has been locked.