2 Replies Latest reply on Dec 14, 2010 10:34 AM by mhsspecialist

    Summing up values of multiplied fields

    mhsspecialist

      Hi All,

      I am not very familiar with scripting functions, but need to accomplish a simple task with one of my forms... summing up the values of multiplied fields.

       

      Example (including custom calculations I used):

       

      A - Branch Fee:  (enter # of branches) x 100 (this number is static) = X         event.value = 100 * getField("BranchFee").value

      B - Rep Fee: (enter # of reps) x 50 (this number is static)  = Y                    event.value = 50 * getField("RepFee").value

      C - Supervisor Fee (enter # of supervisors) x 65 = Z                                   event.value = 65 * getField("SupervisorFee").value

       

      The multiplying function works well, but when I try to sum up the values of the three lines, it will only add up the first two lines until I enter a value in another section of the form (the total then seems to automatically update). I used the Sum function under the calculate tab to select the fields, which I assumed was the easiest way to go. The fields are also in the correct order, and I set them up as Read-only.

       

      So, the sum function is working (kind of), but I'd like the total to be accurate immediately, not when I enter a value in another field. I'm not sure what I'm missing here. Does anyone have a recommendation?

       

      Thanks!