Spreadsheet Widget: Calculations keep generating random decimals

  • Profile Image
    Nelson131
    Asked on April 16, 2020 at 09:11 PM

    I am having issues with my forms calcualtions. It keeps generating random decimals.



    This is a re-post of a comment on How to Perform Form Calculation in the Input Table Field?

  • Profile Image
    Jed_C
    Answered on April 16, 2020 at 10:09 PM

    I checked all 5 forms in your account (Nelson131), but none of your forms has Form Calculation widget or an input table field.

    Can you please share the form in question https://www.jotform.com/help/401-Where-to-Find-My-Form-URL?

    Looking forward for your response. 

  • Profile Image
    Nelson131
    Answered on April 17, 2020 at 04:28 PM
    Team,

    The form is under a shared account for Kevin Burks kburks@burksdigital.com

    https://form.jotform.com/60555782785166


    Thank you in advance,
    Erin Nelson

    ...
  • Profile Image
    Mike
    Answered on April 17, 2020 at 06:12 PM

    This is caused by the implementation of "numbers" in programming languages (JavaScript in this case), some numbers cannot be represented with perfect accuracy. I am forwarding a ticket to our developers to see if the calculations can be improved in the Spreadsheet widget. Although, we cannot provide an ETA on when this will be addressed.

    As a workaround, you may also consider using an Input Table with conditional calculations:

    Calculate Values in the Input Table Through Condition

    The conditional calculations will have two decimal places in numeric results, so there should not no issue with your calculations.

  • Profile Image
    hayk
    Answered on April 20, 2020 at 06:03 AM

    Hi Nelson,

    We have updated the Spreadsheet widget and now the length of numbers with decimal points is fixed. Have a good day!

    Regards,

    Widgets Team

  • Profile Image
    Nelson131
    Answered on April 23, 2020 at 06:28 PM
    Team,

    This has reverted back to the additional decimals.

    Thank you,
    Erin Nelson

    ...
  • Profile Image
    Jed_C
    Answered on April 23, 2020 at 08:10 PM

    I've tried it on your form and it no longer adds random decimals.

    1587687007spreadsheet.png

    Can you please send us a sample screenshot of what you see on your end?

  • Profile Image
    hayk
    Answered on April 24, 2020 at 02:34 AM

    I think the browser's cache doesn't allow you to see the fix. Please just clear your browser's cache or test it in the incognito/private mode and everything will be fine.