GetXFAFormFieldValue

Form fields

Description

Returns the value of the specified XFA form field. The field name may be a relative data path or a standard data SOM path that starts with $data, xfa.datasets.data, or $record. In non-record-processing packets, $record resolves from the outer data record element below $data. Data DOM class selectors #dataGroup and #dataValue select grouped or scalar data nodes by class with numeric or wildcard occurrence selectors. Simple FormCalc-style predicate selectors such as $data.Receipt.Detail.[Total_Price > 200].Description select matching sibling data nodes by child scalar value. Complete XDP packets are accepted when the datasets packet contains either xfa:data or an unprefixed data element. Data nodes are matched by local XML name, so business data elements may use their own namespace prefix. The datasets value APIs also accept the SOM parent property to climb from a selected data node to its container before reading a sibling, for example $data.Receipt.Detail[1].parent.Tax. Descendant selectors such as $data..Total_Price resolve the first matching data node below the current datasets scope. Child wildcard selectors such as $data.Receipt.*.Total_Price return matching data nodes below each direct child branch.

Syntax

Delphi

Function TPDFlib.GetXFAFormFieldValue(Const XFAFieldName: WideString): WideString;

ActiveX

Function PDFlib::GetXFAFormFieldValue(XFAFieldName As String) As String

DLL

const wchar_t * DLGetXFAFormFieldValue(int InstanceID, const wchar_t * XFAFieldName);

Parameters

XFAFieldNameThe XFA datasets field name to work with; accepts relative field paths, $data..., xfa.datasets.data..., !data..., and $record... SOM roots, with dot or slash delimiters before or after the root; slash-delimited paths preserve literal periods, dot-delimited SOM paths accept escaped periods such as Line\.Item, repeated data nodes can be selected with [*] paths such as $data.Receipt.Detail[*].Total_Price, parent can climb to the selected node's parent before continuing the path, class selectors such as #dataGroup and #dataValue address Data DOM groups and scalar values, simple predicate selectors such as .[Total_Price > 200] filter sibling data nodes by child scalar value, descendant selectors such as $data..Total_Price search below the current datasets scope, and child wildcard selectors such as $data.Receipt.*.Total_Price search below every direct child branch