XFA current-record contexts

Version 2.989.3 makes flatten bindings and FormCalc numeric aggregates use the actual data context of a repeated record

For two records with values first and second, a field bound to $record.value displays the corresponding value in each occurrence; Sum($record.item[*].amount) sums that occurrence's items

A nested group or leaf data node resolves through its verified parent-child ownership to the containing record; a missing context or the datasets root retains the first-record default

Detached, foreign and excessive-depth contexts do not silently select the first record; aggregate scope traversal consumes the existing operation and elapsed-time limits

Flatten calculate evaluation sets the current field and data context for the calculation and restores the previous context afterward

The existing legacy $record.#subform[2].label path remains supported, including distinct values in separate record occurrences

This patch preserves the public binding interface and the original root-reference operation charges; it does not add selector syntax or complete general dynamic XFA support

Bound data-node resolution · Field value-node resolution