- Posts: 7
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Use comma to seperate if two or more INSERTANS are selected
- SurveyDesigner
- Topic Author
- Offline
- New Member
Less
More
5 years 5 months ago - 5 years 5 months ago #175863
by SurveyDesigner
Use comma to seperate if two or more INSERTANS are selected was created by SurveyDesigner
Hi there,
I am trying to wrap my head around tailoring questions and need some help.
I used the placeholder fields to display selected answers from a previous question:
Now I want the commas only to appear if more than one answer has been selected. Can you tell me how I achieve that?
Thanks!
I am trying to wrap my head around tailoring questions and need some help.
I used the placeholder fields to display selected answers from a previous question:
Code:
As a {INSERTANS:627324X135X1044SQ001}, {INSERTANS:627324X135X1044SQ002}, {627324X135X1044other} I want to learn …
Now I want the commas only to appear if more than one answer has been selected. Can you tell me how I achieve that?
Thanks!
Last edit: 5 years 5 months ago by SurveyDesigner.
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
5 years 5 months ago - 5 years 5 months ago #175867
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 Use comma to seperate if two or more INSERTANS are selected
For the first comma (replace "Q1" with the appropriate question code):
For the second comma:
Code:
{if(count(Q1_SQ001, Q1_SQ001, Q1_other) > 1, ', ', '')}
For the second comma:
Code:
{if(count(Q1_SQ001, Q1_SQ001, Q1_other) > 2, ', ', '')}
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 5 months ago by tpartner.
The topic has been locked.
- SurveyDesigner
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
5 years 5 months ago #175924
by SurveyDesigner
Replied by SurveyDesigner on topic Use comma to seperate if two or more INSERTANS are selected
Attachments:
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
5 years 5 months ago #175926
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 Use comma to seperate if two or more INSERTANS are selected
Can you attach a survey export (.lss file) containing only the pertinent questions?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- SurveyDesigner
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
5 years 5 months ago #175927
by SurveyDesigner
Replied by SurveyDesigner on topic Use comma to seperate if two or more INSERTANS are selected
I just noticed that the strange display of the comma happened because I did not edit the text in source mode which is why there where some HTML tags added. I will try it now using the source mode.
Do you know how I can add an "other" answer as a condition?
Do you know how I can add an "other" answer as a condition?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10634
- Thank you received: 3698
5 years 5 months ago #175929
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 Use comma to seperate if two or more INSERTANS are selected
Can you attach a survey export (.lss file) containing only the pertinent questions?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- SurveyDesigner
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
5 years 5 months ago #175930
by SurveyDesigner
Replied by SurveyDesigner on topic Use comma to seperate if two or more INSERTANS are selected
Unfortunately not because the questionnaire contains personal data from employees in some of the questions.
The topic has been locked.
- SurveyDesigner
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
5 years 5 months ago #175931
by SurveyDesigner
Replied by SurveyDesigner on topic Use comma to seperate if two or more INSERTANS are selected
Attachments:
The topic has been locked.