I have several times encountered this, where one of the elements between the first and last in a formula is zero and causes the formula not to add the values following the 0 value, and I would like to know how to deal with this.
In the example below, the value of "cpl" is zero and "tax" is $3.00, and the total includes only the values of policy + search. If I swap the positions of "cpl and "tax", then the total includes the value of "tax."
var policy = this.getField("num.SS.Expense.Title.Policy").value
var search = this.getField("num.SS.Expense.Title.Search").value
var tax = this.getField("num.SS.Expense.Title.StateFee").value
var cpl = this.getField("num.SS.Expense.Title.CPL").value
event.value = policy + search + cpl + tax
// Get field values, as numbers
var policy = +getField("num.SS.Expense.Title.Policy").value
var search = +getField("num.SS.Expense.Title.Search").value
var tax = +getField("num.SS.Expense.Title.StateFee").value
var cpl = +getField("num.SS.Expense.Title.CPL").value