• Resolved kkmarch7

    (@kkmarch7)


    Hi I cannot get the equation to calculate correctly. I am would like it to be [(fieldname3) * (fieldname6)] – [(.03 * fieldname3) + ($3000) + (fieldname2)] but when I add this with the [ ] it does not calculate at all.

    An example of what it should be would be
    ($350,000 * .489) – ($10,500 + $3000 + $100,000)
    $171,150 – $113,500 = $57,650

    Is there a way to write this correctly without the [ ] that will have it calculate?

    Thank you for your time.

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

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @kkmarch7,

    In javascript the symbols “[]” are used to refer to array items or object’s properties but not for grouping mathematical operations, in this case you should use only parenthesis, furthermore, in the mathematical operations you should use only numbers, without the currency symbols. Please, pay attention you are using a wrong sign for the substraction operation. So, in your case the equation would be:

    
    fieldname3*fieldname6 - (0.03*fieldname3+3000+fieldname2)
    

    Note that I’ve removed unnecessary parenthesis.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Correct Equation Format’ is closed to new replies.