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
  • h1ghland3r's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 4 months ago #127914 by h1ghland3r
Hi there,

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!
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 4 months ago #127916 by holch
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.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • h1ghland3r
  • h1ghland3r's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 4 months ago - 8 years 4 months ago #127917 by h1ghland3r

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?
Last edit: 8 years 4 months ago by h1ghland3r.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 4 months ago #127919 by tpartner

Or can I create these conditions using Expression Manager?

Yes, see "Relevance (Controlling Navigation/Branching)" - manual.limesurvey.org/Expression_Manager...ation.2FBranching.29

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: h1ghland3r
The topic has been locked.
  • h1ghland3r
  • h1ghland3r's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 4 months ago #127923 by h1ghland3r

tpartner wrote:

Or can I create these conditions using Expression Manager?

Yes, see "Relevance (Controlling Navigation/Branching)" - manual.limesurvey.org/Expression_Manager...ation.2FBranching.29


Nice. I am going to read it.
The topic has been locked.
  • h1ghland3r
  • h1ghland3r's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 4 months ago #127927 by h1ghland3r
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.
The topic has been locked.
  • h1ghland3r
  • h1ghland3r's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 4 months ago #127928 by h1ghland3r

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. =)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose