Welcome to the LimeSurvey Community Forum

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

calculating fields

  • lstrange
  • lstrange's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #116600 by lstrange
calculating fields was created by lstrange
Hi - been using Limesurvey for several years, but just diving in to calculated fields.
Got some calculated fields that aren't working and just don't quite know why.
Using Limesurvey version Version 2.00+ Build 130103 (yes, need to update!)
I have several fields where I am having users enter in numbers, then using equations, I am creating a calculation based off that field.

IE, a numerical field of numbers of hours called telsupportnumberhour (set to Interger only - no)
Then I created an equation field where I calculate this field by 20 to get an amount
My calculation is as follows:
telsupportnumberhour * 20

My equation calculates fine if I have whole number without decimal places, but once I do something like:
telsupportnumberhour = 1.25
Then calculate that against the equation * 20, my answer is 0.
Do I need to add additional formatting to get it to calculate correctly?

Any help greatly appreciated.

Lainie
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 1 month ago #116619 by tpartner
Replied by tpartner on topic calculating fields
Please update to the latest version - this works fine in that version.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
9 years 1 month ago - 9 years 1 month ago #116627 by Mazi
Replied by Mazi on topic calculating fields

tpartner wrote: Please update to the latest version - this works fine in that version.

...and if you want to be absolutely sure that this is fixed you can upload your survey to our demo for testing. The Limesurvey demo system always runs the latest code.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Last edit: 9 years 1 month ago by Mazi.
The following user(s) said Thank You: lstrange
The topic has been locked.
  • lstrange
  • lstrange's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago #116667 by lstrange
Replied by lstrange on topic calculating fields
Thank you for the tip on testing in demo site. That's exactly what it is. Thank you!
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
9 years 1 month ago - 9 years 1 month ago #116685 by Mazi
Replied by Mazi on topic calculating fields
You're welcome.

Have a look at donate.limesurvey.org if you like Limesurvey.

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Last edit: 9 years 1 month ago by Mazi.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose