- Posts: 26
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Can I create a category in a multiple-choice question and sum them?
- h1ghland3r
- Topic Author
- Offline
- Junior Member
I am pretty new with LimeSurvey and I am not so good in English, so sorry for my mistakes.
Let me illustrate. I have a multiple question like this:
Example: Check the answers that you like:
[ ] rice
[ ] beans
[ ] onion
[ ] toyota
[ ] ford
[ ] volkswagen
[ ] dell
[ ] apple
[ ] lenovo
As you can figure out, there are three categories of answers (food/cars/technology).
So, firstly, I would like to set a category for each answer. Is it possible?
Then, I would like to sum each answer to see which category wins the taste of the user.
For example, a user checks:
[x] rice
[ ] beans
[ ] onion
[ ] toyota
[x] ford
[x] volkswagen
[x] dell
[x] apple
[x] lenovo
In this case, the user prefers the category Technology. So, after knowing the user's preference, I will move the user for a next page depending of the choice they made. (condition checking)
So, sorry for this huge text, but I really appreciate if you can help me guys!
- holch
- Offline
- LimeSurvey Community Team
- Posts: 11746
- Thank you received: 2750
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- h1ghland3r
- Topic Author
- Offline
- Junior Member
- Posts: 26
- Thank you received: 1
holch wrote: You could create something with a mix of assessment values and expression manager. So you could add up the value of each response from each group. You will basically create the groups virtually through the calcuation of the expression. Then you can compare the sums for each category and see which category scores best.
Thanks @holch.
Hum.. This will take me a lot of time. Let's try to simplify my survey. Let's ignore the sum.
So, let's continue with categories's idea, but this time I only need to check which categories were chosen by the user.
Because to do what I want, I need to create OR and AND+OR conditions in the same question to check the answers.
For example:
If QUESTION01(food) was checked, go to Group of Questions #1
if QUESTION04(cars) was checked, go to Group of Questions #2
If QUESTION01(food)+QUESTION04(cars) were checked, go to Group of Questions #3
if QUESTION01(food)+QUESTION04(cars)+QUESTION08(technology) were checked, go to Group of Questions #4
etc..
I have 26 possible answers divided in 5 groups. :S
Have I to create a hundred of scenarios..? Or can I create these conditions using Expression Manager?
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10612
- Thank you received: 3691
Yes, see "Relevance (Controlling Navigation/Branching)" - manual.limesurvey.org/Expression_Manager...ation.2FBranching.29Or can I create these conditions using Expression Manager?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- h1ghland3r
- Topic Author
- Offline
- Junior Member
- Posts: 26
- Thank you received: 1
tpartner wrote:
Yes, see "Relevance (Controlling Navigation/Branching)" - manual.limesurvey.org/Expression_Manager...ation.2FBranching.29Or can I create these conditions using Expression Manager?
Nice. I am going to read it.
- h1ghland3r
- Topic Author
- Offline
- Junior Member
- Posts: 26
- Thank you received: 1
I am stuck in logic...
:S :S :S
For my project, I want to set a criteria for when the user select the questions from a category, they will answer a specific question.
I have two questions, which codes are D1 and D2.
For D1 question, the logic should be:
(When someone select at least one item of this category)
((C1_SB01.NAOK == "Y")) or ((C1_SB06.NAOK == "Y")) or ((C1_SB09.NAOK == "Y"))
For D2 question, the logic should be something like this:
(When the user select at least one from the first category and at least one from the second category)
((C1_SB01.NAOK == "Y")) or ((C1_SB06.NAOK == "Y")) or ((C1_SB09.NAOK == "Y")) && ((C1_SB02.NAOK == "Y")) or ((C1_SB07.NAOK == "Y"))
However, when I try to answer the survey, I am always redirected to D1.
- h1ghland3r
- Topic Author
- Offline
- Junior Member
- Posts: 26
- Thank you received: 1
h1ghland3r wrote: Hi guys,
I am stuck in logic...
:S :S :S
For my project, I want to set a criteria for when the user select the questions from a category, they will answer a specific question.
I have two questions, which codes are D1 and D2.
For D1 question, the logic should be:
(When someone select at least one item of this category)
((C1_SB01.NAOK == "Y")) or ((C1_SB06.NAOK == "Y")) or ((C1_SB09.NAOK == "Y"))
For D2 question, the logic should be something like this:
(When the user select at least one from the first category and at least one from the second category)
((C1_SB01.NAOK == "Y")) or ((C1_SB06.NAOK == "Y")) or ((C1_SB09.NAOK == "Y")) && ((C1_SB02.NAOK == "Y")) or ((C1_SB07.NAOK == "Y"))
However, when I try to answer the survey, I am always redirected to D1.
I got it. Just some ( ) missing.