Onchange is a script field visible for fields and parameters. It is triggered when the value in the field changes.
Onchange should not be used to update field values in NewEdit. Use only default value dependencies to update field values. The order Onchange and default value dependencies are executed is not defined, which may result in timing related issues, now, or in the future. This includes but is not limited to usage of the JavaScript functions setFieldValue, multirowAppendRows, multirowClearAllRows, multirowSetRows from the Onchange script field.
Even more importantly, avoid using a combination of Onchange and default value dependencies to replicate a circular dependency as this might create infinite loops that overloads the server in the future.
Do not use Onchange for a checkbox to trigger a calculation, instead use a dedicated JavaScript button to trigger it, this gives a better user experience.