Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Multiple choice with values for assessment

  • Mattjimf
  • Mattjimf's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months ago #144342 by Mattjimf
I have a question that allows the user to select relevant answers to them from a list, I have got this working with Array numerical with check boxes, but I need to store the value of only specific options ie;

Happy
a. Always
b. Most of the time
c. Rarely
d. Never
e. Simple pleasures
f. Only big things
g. Contagious
h. Short lived.
i. Share
j. Keep to myself.


User can select any options, but I only need values returned if options b,,e,g,i are selected.

I'm sure there must be a way of adding a minus value to the other options, can anyone help.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 years 5 months ago #144343 by Joffm
Replied by Joffm on topic Multiple choice with values for assessment
Hi, Mattjimf,
which values do want to be returned.
Where are "minus" values.
In your example I see subquestion codes like "a", "b", "c",...
They reflect the x-scale items, don't they?
Well, let's use them.
The easiest way is to use an equation to calculate your desired values.
You know that a array(numbers) with checkboxes stores the values as "1"=checked.
So you just sum up the desired checkboxes.
In your example for the first item:
{sum(if(q1_SQ001_b=="1",1,0),if(q1_SQ001_e=="1",1,0),if(q1_SQ001_g=="1",1,0),if(q1_SQ001_i=="1",1,0))}
To read: if question "q1", y-scale subquestion "SQ001", x-scale subquestion "b" equal 1 (=checked), then sum 1 else 0.
And so on.
If you have an equation for each subquestion you have stored all results.
Of course it is not necessary to sum 1 and 0. You can chose these values up to your needs, like
{sum(if(q1_SQ001_b=="1",1000,-2),if(q1_SQ001_e=="1",444,333),if(q1_SQ001_g=="1",2,0),if(q1_SQ001_i=="1",0,-999))}

Sample survey attached. Here all is on one page, And the equations are not hidden, which should be in a real survey.

Please read
manual.limesurvey.org/Expression_Manager

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: Mattjimf
The topic has been locked.
  • Mattjimf
  • Mattjimf's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 5 months ago #144397 by Mattjimf
Replied by Mattjimf on topic Multiple choice with values for assessment
Thank you so much for that, was trying to figure it out for ages.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose