Welcome to the LimeSurvey Community Forum

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

Setting Multiply Choice Values?

  • minerva1961
  • minerva1961's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #176088 by minerva1961
Setting Multiply Choice Values? was created by minerva1961
Hi everyone.

Struggling with Expression Manager, there's a very steep learning curve at the start. I'm trying to help one of the researchers here with her project but getting nowhere fast and the online manual isn't very friendly.

She wants to look at Exercise Routines specifically BIKE, I've pasted 3 (of the nearly 40 choices) below

SQ-1: bicycling, stationary, 161-200 watts, vigorous effort
SQ-2: bicycling, stationary, 201-270 watts, very vigorous effort
SQ-3: bicycling, stationary, 51-89 watts, light-to-moderate effort

It's anticipated users will select at least a few of the fields.

How do I give each choice a numeric valve that I can sum in a textbox after the question? I'm sure this must be a FAQ somewhere but my coffee isn't doing it's job..


I've went down a lot of dead-ends yesterday (Validation/Assessment) but not making any headway.

The nice simple BMI example works perfectly on my survey but I'm struggling with this.

Any pointers would be much appreciated.

And my frazzled brain thinks the {sum} should be something like this

{sum(BIKE_SQ-1,BIKE_SQ-2, BIKE_SQ-3)}

but I'm sure that's wrong as well.

TVMIA

Derek
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176095 by tpartner
Replied by tpartner on topic Setting Multiply Choice Values?
Maybe something like this:

Code:
{sum(if(BIKE_SQ1 == 'Y', 200, 0), if(BIKE_SQ2 == 'Y', 270, 0), if(BIKE_SQ3 == 'Y', 89, 0))}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • minerva1961
  • minerva1961's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #176170 by minerva1961
Replied by minerva1961 on topic Setting Multiply Choice Values?
THANK YOU! That's really very very helpful!
Great stuff :-)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose