formData.getAdditionalValue
(FintechOS Studio 20.1.1 and later)
Reads an object that was defined in a preceding form step using formData.setAdditionalValue.
Syntax
formData.getAdditionalValue(key: string): any
| Parameter | Type | Description |
|---|---|---|
key
|
string | Object name. |
Return Value
Returns the value of the key object.
Examples
In this example, we track the duration in milliseconds between the time when a form is opened and the time the final form step (the Thank You screen) is displayed.
In the first form step's afterGenerate.js script, we define a variable called start that holds the current time:
formData.setAdditionalValue('start', new Date());
For details on how to define an object that can be accessed in subsequent form steps, see formData.setAdditionalValue.
In the last form step's afterGenerate.js script, we save the duration in milliseconds passed since the first form step was opened in the elapsedTime attribute of the current record:
formData.model.elapsedTime = (new Date() - formData.getAdditionalValue('start'));
For details on how to access the current record's attribute values, see formData.model.