Create a Change Log for Records

Learn how to build a change log in your Knack app that tracks who made changes to a record and when, using a Logs table and record actions.

What You'll Learn

This article shows you how to create a change log that tracks who made changes to a record and when. The log captures the user responsible, the date of the change, and an optional action type or comment. It does not capture what specific field values changed.

If you need to track the actual values that changed (before and after), see Creating a Version History for Records.

Use Case

You have records that multiple users can create or edit, and you need a record of who touched each record and when. Common examples include project updates, case notes, inventory checkouts, and approval workflows.

Requirements

Steps

1. Create a Logs Table

Navigate to the Tables section of the Builder. Create a new table called "Logs" (or whatever name fits your app). Add the following fields:

  • Connection field to the table you're tracking (e.g., "Item") — one item can connect to many logs
  • Connection field to the user role table (e.g., "Updated By") — one user can connect to many logs
  • Date/Time field (e.g., "Date") — to capture when the change happened
  • Multiple Choice or Short Text field (e.g., "Action") — optional, to capture the type of change (e.g., Created, Updated, Returned, Approved)
  • Paragraph Text field (e.g., "Comments") — optional, for notes about the change

2. Add a Record Action to the Add Form

Navigate to Pages in the Builder and open the page with the form that creates new records in the table you're tracking. Add a record action that inserts a connected record into the Logs table:

  1. Click into the form element
  2. Go to the Record Actions tab (under Submit Actions)
  3. Add a new action: "Insert a connected record"
  4. Select your Logs table
  5. Set the field values:
    • Date — set to "Current Date"
    • Updated By — set to "Logged-In User"
    • Action — set to a custom value like "Created" (if using an Action field)

This creates the first log entry when a new record is added.

3. Add a Record Action to the Edit Form

Navigate to the page with the edit form for the same table and repeat the same steps:

  1. Click into the edit form element
  2. Go to the Record Actions tab
  3. Add a new action: "Insert a connected record"
  4. Select your Logs table
  5. Set the field values:
    • Date — set to "Current Date"
    • Updated By — set to "Logged-In User"
    • Action — set to a custom value like "Updated" (if using an Action field)
📘

Add this to every form that edits these records. If you have multiple edit forms across different pages, add the record action to each one. Otherwise, edits made through forms without the action won't be logged.

4. Display the Change Log in Your Live App

Navigate to Pages in the Builder and open the details page for the record you're tracking. Add a table element to show the change log. Source it from the Logs table and filter it to show logs connected to the current page's record.

This gives users a timeline showing every change made to that record, who made it, and when.

📘

Sort by most recent first. Set the table element's default sort to show the most recent log entries at the top so users see the latest activity first.

What This Tracks vs. What It Doesn't

TrackedNot Tracked
Who made the changeWhat fields changed
When the change was madePrevious and new values
Type of action (optional)Which specific data was modified
Comments (optional)

If you need to capture the actual field values that changed, see Creating a Version History for Records.

Next Steps