What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Calculation Wizard giving incorrect values

    Asked by im2fst4u on October 31, 2014 at 12:12 AM

    I have issue with the calculation wizard not giving a correct value. I have checked outside of the form with a calculator with the values it is inputting and it is incorrect.

    The box is called (Xi-FL)^2 Totals and is taking the 10 or so values and adding them incorrectly. This may have to take up to 100 values eventually so I need to figure out what is wrong now.

    Page URL:
    http://www.jotform.ca//?formID=41318465130245

  • Profile Image
    JotForm Support

    Answered by jonathan on October 31, 2014 at 09:30 AM

    Hi,

    From what I checked on the (Xi-FL)^2 Totals field the calculation done was just a summation of all the other fields involve.

     

    So, the erroneous calculation is most likely to have happened on one or some of the fields that were summarize/added.

    I am not able to understand yet the formula used on the other fields. 

    But to determine which of those added fields in (Xi-FL)^2 Totals   is erroneous you can try checking 2 at a time only.

    Example, add only the 2 fields

     

    If the total is wrong, then one or both of the added fields must have incorrect calculation already. Repeating this process will enable to pinpoint which calculation is giving the wrong/incorrect values.

    Hope this help. Please inform us if you were able to determine which calculation is erroneous and will check it also.

     

    Thanks.

     

     

  • Profile Image

    Answered by im2fst4u on December 03, 2014 at 10:34 PM

    Okay after reworking my form I still cannot get this to work. I have everything working except the (Xi-FL)^2 Totals calculation. The odd part is that it works perfectly until you click submit. Once you do that it miscalculates.

    According to my reference sheet in excel the numbers that contribute to (Xi-FL)^2 Totals are all correct. And adding them together by calculator results in the number on the reference sheet; 239.2675. (this value is also present before the submit button is clicked) But once the submit button is clicked the value changes to 175.3894. Waay off. (and this is with the correct values being added to (Xi-FL)^2 Totals as stated before)

    Here are my testing values (laps) for you to try and see if you get the same results...
    1:35.916 1:28.645 1:37.282 1:30.311 1:35.053 1:27.713 1:29.222 1:28.447 1:27.472 1:28.339

    Total Time=908.400

    (Xi-FL)^2 Totals=239.2675

    Variance=23.9268

    BCRS=4.8915

    btw Go to this form, the perfectly working one. (other than the mentioned problem)
    http://www.jotform.ca//?formID=43238011957252

  • Profile Image
    JotForm Support

    Answered by Welvin on December 04, 2014 at 01:46 AM

    The only problem I saw here is the individual calculation widget for each lap. You have this calculation to the form:

    As you could see, the decimal point and the milliseconds come as text format. The correct should be like this:

    Please correct that and check if the helps you resolve the problem. 

    Thanks

  • Profile Image

    Answered by im2fst4u on December 04, 2014 at 08:26 PM

    No this makes it worse.
    Without the decimal point put in as a text it breaks what I'm trying to imput.

    Ex. Imputs are: Min=1 Sec=20 Milli=123
    Should convert to: 80.123
    But all that apears in the "lapX" box is 123.

    It only picks up the milliseconds.

    This method to do what I need was made by EltonCris in this thread:
    http://www.jotform.com/answers/367801-Convert-min-sec-milliseconds-to-sec-milliseconds-using-form-source-code#7

    Maybe he would have a solution if you can't think of anything?

  • Profile Image
    JotForm Support

    Answered by jonathan on December 05, 2014 at 06:14 AM

    Hi,

    Can you please clarify that you want to make the calculation via the form's source code instead?

    There will be different procedure if you will use the form's source code and the do the calculations outside the form via an independent javascript code.

    If this is what you wanted to do, we can assist you with the custom calculation solution, but you have to guide us on all the formula/calculations you want to happen so we can create the code for it.

    We will wait for your updated response.

    Thanks.