Skip to main content

run_calculations

Function run_calculations 

Source
pub fn run_calculations(
    form: &mut FormTree,
) -> Result<ScriptResult, ScriptError>
Expand description

Execute all calculate scripts in the form tree, updating field values.

Walks the tree depth-first. For each Field node with a calculate script, evaluates the script and sets the field’s value to the result. Returns a summary of which fields were updated.