- Posts: 114
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How can a respondent's answers be displayed in related questions or options?
- RitaShen
- Topic Author
- Offline
- Premium Member
Less
More
4 months 2 days ago #253843
by RitaShen
How can a respondent's answers be displayed in related questions or options? was created by RitaShen
Please help us help you and fill where relevant:
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:LimeSurvey hosting
Survey theme/template: 5.6.49 / bootswatch
==================
How to display a respondent's answer in other options or short free text in related questions?
for example, if the respondent's answer is AAA in other options,
I would like the respondent's answers to be displayed in the following related questions.
Your LimeSurvey version: [see right hand bottom of your LimeSurvey admin screen]
Own server or LimeSurvey hosting:LimeSurvey hosting
Survey theme/template: 5.6.49 / bootswatch
==================
How to display a respondent's answer in other options or short free text in related questions?
for example, if the respondent's answer is AAA in other options,
I would like the respondent's answers to be displayed in the following related questions.
Please Log in to join the conversation.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12940
- Thank you received: 3979
4 months 2 days ago - 4 months 2 days ago #253844
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic How can a respondent's answers be displayed in related questions or options?
Hi,
I always advice:
Activate the survey, enter some data and have a look at the response table.
Here you see.
A single question with the "other" option creates two columns in the database.
If a "normal" option is chosen, the code is stored
If the "other" option is chosen "-oth_ ios stored in the column (Q1) and the text is stored in "Q1_other".
To display this you have to use the IF function.
Now you have several options:
1. IF the text is empty show the answer option else show the text
{if(is_empty(Q1_other),Q1.shown,Q1_other)}
2. IF the stored code is "-oth-" show the text else show the answer option
{if(Q1=="-oth-",Q1_other,Q1.shown)}
3. If you use numerical codes: IF the stored code is numeric show the answer option else show the text
{if(is_numeric(Q1),Q1.shown,Q1_other)}
Joffm
I always advice:
Activate the survey, enter some data and have a look at the response table.
Here you see.
A single question with the "other" option creates two columns in the database.
If a "normal" option is chosen, the code is stored
If the "other" option is chosen "-oth_ ios stored in the column (Q1) and the text is stored in "Q1_other".
To display this you have to use the IF function.
Now you have several options:
1. IF the text is empty show the answer option else show the text
{if(is_empty(Q1_other),Q1.shown,Q1_other)}
2. IF the stored code is "-oth-" show the text else show the answer option
{if(Q1=="-oth-",Q1_other,Q1.shown)}
3. If you use numerical codes: IF the stored code is numeric show the answer option else show the text
{if(is_numeric(Q1),Q1.shown,Q1_other)}
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 months 2 days ago by Joffm.
The following user(s) said Thank You: RitaShen
Please Log in to join the conversation.
- RitaShen
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 114
- Thank you received: 1
4 months 2 days ago #253845
by RitaShen
Replied by RitaShen on topic How can a respondent's answers be displayed in related questions or options?
Many thanks!!!
Please Log in to join the conversation.