- Posts: 21
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Grouping answers from previous question
- saifshaikh
- Topic Author
- Offline
- Junior Member
Less
More
6 years 9 months ago #155134
by saifshaikh
Grouping answers from previous question was created by saifshaikh
hello,
can I group answers of a question to another hidden question in database.
Eg.
Q1 Pleae specify Customer type?
1 Owner
2 Tenant
3 Investor
4 Office employee
5 Domestic visitor
6 Regional visitor
7 International visitor
Q2 Based on Q1
1 Resident (If Q1 = 1, 2 & 3)
2 Office (If Q1 = 4 )
3 Visitor (If Q1 = 5,6,7 )
Thanks
Saif
can I group answers of a question to another hidden question in database.
Eg.
Q1 Pleae specify Customer type?
1 Owner
2 Tenant
3 Investor
4 Office employee
5 Domestic visitor
6 Regional visitor
7 International visitor
Q2 Based on Q1
1 Resident (If Q1 = 1, 2 & 3)
2 Office (If Q1 = 4 )
3 Visitor (If Q1 = 5,6,7 )
Thanks
Saif
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
6 years 9 months ago #155138
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 Grouping answers from previous question
You can use the Expression Manager assignment operator to set a select-radio question depending on the answers to Q1 -
manual.limesurvey.org/Expression_Manager..._Assignment_Operator
1) Place Q2 in a group following the Q1 group.
2) Give Q2 a CSS class "hidden" (assuming you want to hide it).
3) Place a hidden equation type question directly after Q2 with this as the question value:
Sample survey attached (I have left Q2 visible so you can see the results):
1) Place Q2 in a group following the Q1 group.
2) Give Q2 a CSS class "hidden" (assuming you want to hide it).
3) Place a hidden equation type question directly after Q2 with this as the question value:
Code:
{Q2=if(Q1< 4, 1, if(Q1== 4, 2, 3))}
Sample survey attached (I have left Q2 visible so you can see the results):
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Attachments:
The topic has been locked.
- saifshaikh
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
- Thank you received: 0
6 years 9 months ago #155140
by saifshaikh
Replied by saifshaikh on topic Grouping answers from previous question
Thanks Tony, that perfectly works.
The topic has been locked.