calculating fields

More
2 years 9 months ago #116600 by lstrange
lstrange created the topic: calculating fields
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

Please Log in to join the conversation.

More
2 years 9 months ago #116619 by tpartner
tpartner replied the 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.

Please Log in to join the conversation.

More
2 years 9 months ago - 2 years 9 months ago #116627 by Mazi
Mazi replied the 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
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
Last Edit: 2 years 9 months ago by Mazi.
The following user(s) said Thank You: lstrange

Please Log in to join the conversation.

More
2 years 9 months ago #116667 by lstrange
lstrange replied the topic: calculating fields
Thank you for the tip on testing in Demo site. That's exactly what it is. Thank you!

Please Log in to join the conversation.

More
2 years 9 months ago - 2 years 9 months ago #116685 by Mazi
Mazi replied the 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
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"
Last Edit: 2 years 9 months ago by Mazi.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!