Welcome to the LimeSurvey Community Forum

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

Can I Multiply the answer by some number?

  • panch_evg
  • panch_evg's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 11 months ago #167218 by panch_evg
Hello everybody.

I started using LimeSurvey and decided many questions that I had, if I didn't decided my question alone I will ask comunity to help.

Is it possible to multiply the user's response to some number (10, 20)? and put it in the database after multiplying?

I understand it's worth using JS, but how to correctly implement it and whether this path is correct - tell me.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #167235 by holch
Replied by holch on topic Can I Multiply the answer by some number?
You should use Expression Manager. Have a look at the manual pages about it.

What you would do is create a equation type question and then multiply the value of the users response and save it in the equation question (which you can hide).

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

The following user(s) said Thank You: panch_evg
The topic has been locked.
  • panch_evg
  • panch_evg's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 11 months ago #167324 by panch_evg
Replied by panch_evg on topic Can I Multiply the answer by some number?
Yes it realy what I will find.

If you can, explain me please, how I can don’t save a responses which was multiply of some number? And save just result of my equal?

Thanks
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 11 months ago #167374 by holch
Replied by holch on topic Can I Multiply the answer by some number?
Not sure what you are trying to do. The number given by the respondent doesn't hurt you. So I would just leave it and ignore it during analysis. However, if you really must change it as well, you might be able to write the newly calculated value back into the question where the respondent gave the answer (probably possible via EM, you'll need to try it yourself, maybe something like questioncode==value). But I personally wouldn't recomend it, because if something goes wrong with the expression at one point during the survey, you will not be able to recalculate the value from the originally given value anymore. So I personally would keep them both.

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.

Lime-years ahead

Online-surveys for every purse and purpose