Font Size:
Ask Joget AI

Preserving Audit Trail on Existing Spreadsheet Rows

Introduction

This guide outlines how to preserve a complete audit trail of child records and uploaded files using the Spreadsheet element in Joget. Instead of allowing edits or deletions, this method ensures that all historical data remains intact by enforcing append-only behavior.

How does it work?

The approach relies on disabling editing for any row that already contains an existing record identifier. When a row has an existing ID value, the system treats it as historical data and sets the row as read-only. Users can still upload new files or create updated records, but these actions will always create new rows rather than overwrite older ones.

You can configure this behaviour by applying the following settings in the Spreadsheet element under Custom Settings (JSON):

{
    cells: function(row, col, prop) {
        const existId = this.instance.getDataAtRowProp(row, 'id');

        if (existId) {
            return { readOnly: true };
        }
    }
}

Expected Outcome

Users will be able to add new entries freely, ensuring that updates and additional files are captured as new records. All existing entries will remain locked from edits or deletion, resulting in a complete and reliable history of all transactions and uploaded files within the Joget application.

Created by Nik Nufayl Daniel Md Nezam Last modified by Debanraj Ravindran on Apr 24, 2026