HPDFXFAResolveFieldValueNode
Unit: HPDFXFA
Declaration
function HPDFXFAResolveFieldValueNode(Document: TXFADocument;
FieldNode, DataNode: TXFANode; CreateNode: Boolean= False;
MaxNodes: Integer= 65536): TXFANode; overload;
function HPDFXFAResolveFieldValueNode(Document: TXFADocument;
FieldNode, DataNode: TXFANode; CreateNode: Boolean;
MaxNodes: Integer; var RemainingOperations: Integer; Deadline: Int64;
DeadlineCheck: TXFABindingDeadlineCheck = nil): TXFANode; overload;
Parameters
| Parameter | Meaning |
|---|---|
Document | The native XFA document that owns the field, data and form packets |
FieldNode | The template field whose effective value is requested |
DataNode | The dataset occurrence context; repeated fields require their own occurrence context |
CreateNode | False resolves readable data, a form value or the template default; True returns a writable instance value |
MaxNodes | The occurrence bound passed to native form instance creation |
Behavior
An existing bound dataset node wins even when its content is empty; a missing node falls back to the corresponding native form value and then to the first value child in the template field
A read-only lookup does not create a dataset or form node, and returns nil when none of these value sources exists
With CreateNode True, normal data binding creates or returns the writable dataset node; an unbound field or a document without writable datasets uses a separate native form value instead
A newly created dataset node can initially be empty; the caller supplies the committed value rather than assigning through a previously returned template default
The returned node belongs to Document and must not be freed by the caller; read-only lookup can return a shared template node, so obtain a writable node with CreateNode True before changing its content
Null Document or FieldNode returns nil; excessive native form occurrence indices or ancestor depth raise EHPDFXFAError through the form resolver
Consumers
The budgeted overload shares the caller's operation allowance and deadline with native binding resolution; zero RemainingOperations is exhausted, negative disables the caller allowance and a negative Deadline disables elapsed-time checks
DeadlineCheck can supply the caller's clock domain; nil uses GetTickCount64 milliseconds, while the interactive runtime supplies its configured monotonic deadline check
Binding scans retain fixed segment, traversal depth and charged-step limits; budget failures raise EHPDFXFAError and interactive transactions restore their native snapshot
See HPDFXFAResolveBoundDataNode and TXFABindingDeadlineCheck for the binding budget and callback contracts
The interactive runtime and XFA AcroForm conversion share this resolver, keeping missing defaults, explicitly empty data and repeated occurrence values consistent
Interactive edits and calculations reacquire a writable instance node before committing, preserving the template default for other instances
Related APIs
Native XFA Field Defaults, HPDFXFAResolveFormInstanceNode and Interactive Dynamic XFA Widget Runtime