- Posts: 39
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Neeed to display some questions if I check many options
- Bti2024
- Topic Author
- Offline
- Junior Member
Less
More
2 months 3 days ago #257081
by Bti2024
Neeed to display some questions if I check many options was created by Bti2024
Please help us help you and fill where relevant:
Your LimeSurvey version: LimeSurvey Cloud
Version 5.6.54
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Hi,
I have a multiple choice question (Type M) , 2 checked boxes. My need is: if I checked one of those checked boxes it will display one or 2 questions.
For example (see attached picture): if I check the "Executif" choice it will display a question related to this choice. And if I checked both check boxes "Executif"+"Chef de projet" it will display the 2 related questions.
Thanks a lot!
Your LimeSurvey version: LimeSurvey Cloud
Version 5.6.54
Own server or LimeSurvey hosting:
Survey theme/template:
==================
Hi,
I have a multiple choice question (Type M) , 2 checked boxes. My need is: if I checked one of those checked boxes it will display one or 2 questions.
For example (see attached picture): if I check the "Executif" choice it will display a question related to this choice. And if I checked both check boxes "Executif"+"Chef de projet" it will display the 2 related questions.
Thanks a lot!
Attachments:
Please Log in to join the conversation.
- Joffm
- Online
- LimeSurvey Community Team
Less
More
- Posts: 12941
- Thank you received: 3979
2 months 3 days ago #257083
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Neeed to display some questions if I check many options
And what is your question?
I suppose you know how a condition is set on a checkbox.
And to check if both are checked, you may simply use an AND to combine the two parts, like QCODE1 is checked AND QCODE2 is checked
Or you can use the function "count()" to checjk, like count(QCODE1,QCODE2)==2
I suppose you know how a condition is set on a checkbox.
And to check if both are checked, you may simply use an AND to combine the two parts, like QCODE1 is checked AND QCODE2 is checked
Or you can use the function "count()" to checjk, like count(QCODE1,QCODE2)==2
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.
- Bti2024
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 39
- Thank you received: 0
2 months 3 days ago #257093
by Bti2024
Replied by Bti2024 on topic Neeed to display some questions if I check many options
Please Log in to join the conversation.
- Joffm
- Online
- LimeSurvey Community Team
Less
More
- Posts: 12941
- Thank you received: 3979
2 months 3 days ago #257094
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Neeed to display some questions if I check many options
Hi,
if you read the manual you'd know that QCODE is a placeholder for the real question code.
[url] manual.limesurvey.org/ExpressionScript_-...code_variable_naming [/url]
Now in your condition you enter a logical term that is either TRUE or FALSE. If TRUE the question is displayed, if FALSE not.
To find out what "QCode is checked" means, the best is to activate your survey, enter some data and have a look at the response table.
Here you see, how you access the respective variables and how the answers are stored.
You have several options:
Either you say:
QCode is not empty -> then it is selected.
And in the "implemented functions"
[url] manual.limesurvey.org/ExpressionScript_-...mplemented_functions [/url]
you find the functiuon "is_empty()"
Here
[url] manual.limesurvey.org/ExpressionScript_-...ntation/en#Operators [/url]
you see that "!" is the "not" operator.
Now "QCode is not empty" is in LimeSurvey syntax !is_empty(QCode)
Or you say
QCode is equal to this value
If you followed my advice to activate the survey, enter data and investigate the response table, you will have seen that a multiple question stores
selected : "Y"
not selected: ""
Meaning: To say "QCode is selected" in LimeSurvey syntax QCode=="Y"
Now yopu should be able to create your condition.
if you read the manual you'd know that QCODE is a placeholder for the real question code.
[url] manual.limesurvey.org/ExpressionScript_-...code_variable_naming [/url]
Okay, now you know how your "QCODE" looks likeKnowing that the "Executive" check box response has the code SQ1.
Now in your condition you enter a logical term that is either TRUE or FALSE. If TRUE the question is displayed, if FALSE not.
To find out what "QCode is checked" means, the best is to activate your survey, enter some data and have a look at the response table.
Here you see, how you access the respective variables and how the answers are stored.
You have several options:
Either you say:
QCode is not empty -> then it is selected.
And in the "implemented functions"
[url] manual.limesurvey.org/ExpressionScript_-...mplemented_functions [/url]
you find the functiuon "is_empty()"
Here
[url] manual.limesurvey.org/ExpressionScript_-...ntation/en#Operators [/url]
you see that "!" is the "not" operator.
Now "QCode is not empty" is in LimeSurvey syntax !is_empty(QCode)
Or you say
QCode is equal to this value
If you followed my advice to activate the survey, enter data and investigate the response table, you will have seen that a multiple question stores
selected : "Y"
not selected: ""
Attachment not found
Meaning: To say "QCode is selected" in LimeSurvey syntax QCode=="Y"
Now yopu should be able to create your condition.
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Please Log in to join the conversation.