• Resolved eirini7

    (@eirini7)


    hello!
    i have problem about the calculated field.I use only simply prosibil + .very SIMPLY equation!!only additives.But it doesn’t calculate the field.it shows them all together..
    For example: fieldname4+fieldname6+fieldname7 = 0+30+10= 40 € BUt it shows = 3010 €.
    I am waiting your response.
    Thank you!!!

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter eirini7

    (@eirini7)

    Somebody help????please!!

    Plugin Author codepeople

    (@codepeople)

    Hello @eirini7,

    In javascript the plus (+) operator is overloaded, it is used to add numbers or concatenate texts, so, if the browser determines that any of the operands in the sum seems a text: fieldname4+fieldname6+fieldname7 it will apply the concatenation.

    The solution is eliminate the ambiguity forcing to considere all the operands as numbers, simply editing your equation as follows:

    fieldname4*1+fieldname6*1+fieldname7*1

    In reality fieldname4*1=fieldname4 but as the multiplication operator is not overloaded the result would be always a number, solving the ambiguity of the plus operator.

    Best regards.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘calculated field not ”calculate”’ is closed to new replies.