• Resolved morphpr

    (@morphpr)


    Hi

    Our form sometimes delivers the correct calculation and at other times, it doesn’t – even with the same inputs. Essentially, it should calculate a sales fee that is 1% of the property value down to a minimum fee of £1500. So even if the property value is less than 150000, it should still return £1500. If the customer confirms that they are an existing customer then it should apply a fee of 0.8% of the property value down to a minimum fee of £1200. The Property value field has ID=2, there’s a hidden fee percentage field ID=20 and it’s set to 0.01. The existing/new customer radio field (ID=15) has a value of .8 for yes (an existing customer) and 1 for no (new customer). Then we have a first step calculation that produces the maximum of two numbers – either 1500 or 1% of the property value like this MAX((fieldname20*fieldname2),1500) and then we have second step that applies the discount in the event that it’s an existing customer by multiplying by 0.8 if they are an existing customer and 1 if they are not PREC(fieldname15*fieldname14,2)

    Having done lots of tests today on the form, we’ve had a test using a property value of £11,000, where they were a new customer, returning a value of £0. We’ve had a property value of 200000 and an existing customer returning a value of 1200 which should have been 1600 and again two tests for 200000 for a new customer returning a value of 1500 on two occasions and 2000 on one occasion (2000 being the correct answer). Please can you advise as to what’s going wrong here? Many thanks. Jamie

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @morphpr

    I’m testing your form manually. Entering the 200000 and selecting the “Yes” option, the equations evaluated are:

    MAX(0.01*200000, 1500) = 2000
    PREC(2000*[0.8], 2) = 1600.00
    PREC(1600*.2, 2)) = 320.00

    If you select the “no” option, the equations evaluate were:

    MAX(0.01*200000, 1500) = 2000
    PREC(2000*[1], 2) = 2000.00
    PREC(2000*.2, 2)) = 400.00

    And those were my results in all my tests.

    Please, let me know the browser you are using.

    Furthermore, in your case, you should tick the checkbox: “Merge ticked up options (sum or concatenation) or their values are returned as an array.” in the settings of the checkbox field.

    Best regards.

    Thread Starter morphpr

    (@morphpr)

    Hi. Like you, I haven’t been able to reproduce these issues myself but I when my client tests it – and others in his office, he gets the erroneous results and I can see it has genuinely happened because I am copied directly into the results. I shall ask them to test again now that I have ticked the checkbox ‘Merged ticked up options ….’. I’ll also check their browser and get back to you. Thanks

    Thread Starter morphpr

    (@morphpr)

    Hi

    I’ve had the client run six more test submissions this morning using Chrome, Chrome Incognito mode and Explorer. Of the six tests three returned the correct answer and three returned incorrect answers. With property value of 150,000 and being an ‘existing customer, Chrome returned £0, as a new customer Chrome incognito returned £0 and as an existing customer only Explorer returned the correct figure of £1200. With a property value of 400000, as a new customer Chrome returned £1500 which is incorrect, as a new customer Chrome incognito returned £4000 and Explorer did the same – both correct. this was just one user at one PC in their office. Yesterday, two of them ran tests from two different PC’s in the office and both got many incorrect results. Working from home on my Mac, I have run tests but have not been able to reproduce an error. I can be certain though that they are getting these results because I have the screenshots as well as being copied into the confirmation emails. Really strange. Can’t understand how I can’t seem to get an error myself but around 50% of their tests deliver incorrect results with some delivering a figure of £0.

    Please advise.Thanks

    Jamie

    Plugin Author codepeople

    (@codepeople)

    Hello @morphpr

    Please, contact me through my private website because I don’t understand what do you mean with “new user” and “existent users”. I can check only the public form, but I don’t know if there is information loaded from cache. Contact Us

    Best regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Calculation is delivering inconsistent results’ is closed to new replies.