• Resolved ben10ben10

    (@ben10ben10)


    Hi, I am trying to make a calculated fields form using a formula I created in excel, but it is not working. Does anyone know how I can get this to work? Here is the formula in excel:

    =IF(C21>12000,66.38+((C21-12000)/1000)*8.76),IF(C21>6000,34.46+((C21-6000)/1000)*5.32),IF(C21>5000,34.46,IF(C21>4000,29.57,IF(C21>3000,24.67,IF(C21>2000,13.04,IF(C21>1000,12.62,IF(C21>0,5.54,IF(C21=0,5.39)))))))))

    I tried changing all of the C21 cells to the appropriate field name, but it is not working.

    Thanks!

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

    (@codepeople)

    Hello @ben10ben10,

    The operation “IF” has some differences between our plugin’s implementation and the implementation in Excel,

    – First, in our plugin you should remove the assignment symbol “=” at beginning of the formula. The equation would be directly: IF(

    – Second, in javascript the equality operator is represented by the double sign “==” and not “=” because this last represents the assignment, so, the piece of code: fieldname21=0, must be edited as: fieldname21==0

    – Third, in our plugin the “IF” operation requires the structure: IF(condition, result if condition true, result if condition false), so, this nested IF operation:

    IF(fieldname21=0,5.39)

    should be edited as:

    IF(fieldname21==0, 5.39, '')

    If you need additional help, please, indicate the URL to the web page where the form is inserted, for checking the formula in action.

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Tiered Prices’ is closed to new replies.