GetFormScriptDiagnostics

Forms, diagnostics

Description

Returns diagnostics for the most recent direct form-script event execution

Syntax

Delphi

Function TPDFlib.GetFormScriptDiagnostics: WideString;

ActiveX

Function PDFlib::GetFormScriptDiagnostics() As String

Available on IPDFlibrary4 from type library version 3.5

DLL

const wchar_t* DLGetFormScriptDiagnostics(int InstanceID);
const char* DLGetFormScriptDiagnosticsA(int InstanceID);

Return values

Returns a JSON object containing status, event name, operation and property counts, peak and configured nesting depth, result length, configured limits, and the parser error offset and token when applicable

Remarks

Status is success, rejected, unsupported, invalid, budgetExceeded or notRun

An absent action reports notRun with reason missingAction

hostActionMode is reject or defer. hostRequests lists each host action the script reached, in order, as an object with an action name and an arguments array of the evaluated values

unsupportedReason is empty unless an unsupported status has an identified cause: hostAction (a host action in reject mode), hostResult (a host call whose answer is needed) or dynamicExecution (eval, new Function, timers and similar)

Calls to EvaluateXFAFormCalc and ExecuteXFAFormCalculations also replace this report, using engine: xfa-formcalc; successful reports include passes, changedFields and operations, while failures include errorCode, message and committed: false

ExecuteXFAFormCalculations keeps its engine label for compatibility and adds profile: bounded-xfa-calculation for the FormCalc and JavaScript calculation profile it shares

See also

ExecuteFormFieldScriptEvent, GetFormScriptLimitsJSON, SetFormScriptHostActionMode