# The old() function

**URL:** https://community.novulo.com/t/the-old-function/894
**Category:** Wiki
**Tags:** implementation
**Created:** [March 5, 2026, 11:08am UTC](https://community.novulo.com/t/the-old-function/894 "2026-03-05T11:08:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![k.molokova](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@k.molokova](https://community.novulo.com/u/k.molokova)
#### Post date: [March 5, 2026, 11:08am UTC](https://community.novulo.com/t/the-old-function/894/1 "2026-03-05T11:08:18Z")

</div>

The Novulo offers a built-in old() function. It shows a previous value of a record when this record is being (but not yet) updated.

For example, there is a book record with the category “Crime”. If we click to “Edit” this book and change (but not save yet!) a category to “Biography”, we could see old and new values in the expression gebugger: old() = crime, new = biography.

 ![1](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/4/4de86da22f234b7761fb39762d8f857bb5e48a39.png)

 ![2](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/b/bab017fff9485369e1122b1a7141257dc020839f.png)

 ![3](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/3/303d25c6150cd752747ed9e16e718402de6da08d.png)

> Uncheck the “Read uncommitted” checkbox under the “Other” tab.

As soon as we saved changes, the old category name will be showed as biography. When a record is not locked, the old() value is always equal to the current value.

 ![4](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/f/f925b5e80077e3ffdaed193a3a53a440afaae948.png)

> More about locking records is here: [Lock record, exclusive lock, database lock and model lock](https://community.novulo.com/t/lock-record-exclusive-lock-database-lock-and-model-lock/435)

The old() function could be useful in [Novulo data processes](https://community.novulo.com/t/novulo-data-processes/213) (beforeInsert or beforeUpdate) to compare values: the previous and the new one that is made but not saved yet. This can be used for logging mutations, etc.

> Check also: [Best practice for change logs or mutations](https://community.novulo.com/t/best-practice-for-change-logs-or-mutations/341)
