formData.model

(FintechOS Studio 20.1.1 and later)

Provides read/write access to the values of the form fields of the current record's attributes. If you update a form field value, it will be saved in the corresponding record attribute when the form is saved.

NOTE  
In versions prior to 24.2, formData.model only interacts with the currently displayed form fields, not with the data model. Therefore, if an attribute is not displayed in the current form, you cannot retrieve it using the formData.model method.
Starting with release 24.2, you can operate on attributes that are not rendered in the user interface. However, an attribute field still needs to be present in the UI (e.g.: hidden attributes), otherwise its value will not be recorded when saving the form or flow.
To retrieve attribute values from the database, see ebs.getFormEntity.

Retun Value

Returns a JSON object containing key-value pairs for the current record's attribute names and attribute values, for example:

Copy
{
    "businessStatus": {
        "_id": "c33e87bd-763f-4cf0-8a73-c860e8a96747",
        "_name": "status1"
    },
    "businessStatusId": "c33e87bd-763f-4cf0-8a73-c860e8a96747",
    "businessUnitId": "a3d2909b-df67-49d6-b7e0-2dc912c12484",
    "createdByUserId": "4afdc8a9-eb91-4359-81d6-c3a462fae866",
    "createdOn": "2020-03-02T15:15:37.000Z",
    "elapsedTime": null,
    "file": null,
    "method": null,
    "modifiedByUserId": null,
    "modifiedOn": null,
    "nextBusinessStatusId": null,
    "previousBSId": null,
    "ServerSDKTestid": null,
    "entityStatusId": null,
    "userId": null
}

You can use the dot notation or bracket notation to access individual record attributes, for example:

Copy
formData.model.elapsedTime

or

Copy
formData.model['elapsedTime']

Examples