---
tagName: 8.38.0
name: >-
  data.RecordFactory: support for calculated fields inside the record
  originalData symbol
publishedAt: '2025-04-04T13:20:35Z'
isPrerelease: false
isDraft: false
---
# data.RecordFactory: support for calculated fields inside the record originalData symbol

* important: the signature of calculate() for a given `data.Model` field changed: `calculate(data, fields)`, where data is either record[dataSymbol] or record[originalDataSymbol]

Example using it:
```
        fields: [{
            name: 'firstname',
            type: 'String'
        }, {
            name: 'id',
            type: 'Int'
        }, {
            name: 'lastname',
            type: 'String'
        }, {
            name: 'fullname',
            type: 'String',
            calculate: data => `${data.firstname} ${data.lastname}`
        }],
```

https://github.com/user-attachments/assets/0d7f3a6e-d98e-4769-a29f-fab5ec649ecb

