Skip to main content
Inspiring
February 4, 2018
Question

Recalculate upon exiting a field

  • February 4, 2018
  • 1 reply
  • 837 views

I have a form with 10 fields (type: number). The first field is Income. The remaining input fields are other payroll related numbers in which User would type a number or select from options that return a number. There are also ten other read-only fields that run calculations based on the input fields as user updates them. Because of "Order of Calculation", if User completes any number of input fields, and then wishes to test a different amount in Income in that first field, the calculable read-only fields are unaffected (in other words, the calculations remain related to the original Income input, not the updated Income input). My current solution is to have the entire form reset to zeros upon mouse-down in Income. This is an unsatisfactory semi-solution, because User must go through and re-type or select the remaining 9 fields again. I would rather have all the read-only fields simply recalculate upon mouse exit from Income.

If you know of a way to do this - especially without writing a long script that calls upon each of the read-only fields, individually, to recalculate (kind of a "Recalculate All" function), please let me know.

This topic has been closed for replies.

1 reply

Inspiring
February 4, 2018

Check the order the fields are calculated in and open the JavaScript console to see if there any script errors.

rsbisaAuthor
Inspiring
February 4, 2018

Ok, will do. But, from your response I'm inferring if the fields are in proper order and there are no errors, then I would not have a problem and the fields should automatically recalculate when I change Income. Is that correct?

Thanks!

Inspiring
February 5, 2018

Unless you turn off calculations they should recalculate whenever a field used in a calculation is changed.

If you change another field and the calculations update or some due then there is a problem.