Table of Contents

Create a Version History for Records

Sarto Jama Updated by Sarto Jama

This article will review setting up a version history for your records. This will track the User who made the edit, the date edited and the field values changed.

Scenario

You have forms that create and update records. You want to track when the date and time, as well as which user created or updated the record.

Requirements

Before setting up a version history for your records, you will need to have users enabled in your app. You can read more about getting started with users here.

Recipe

  1. Create an Object to Track History

In the Schema section of your builder, create a new object. Let's call this object "Edit Log."

Once the new object is created, add the following fields to that new object:

  • "Edited by": A connection field, connecting to the User. Where each “Edit Log” record connects to one “User” and each “User” connects to many “Edit Log” records.
  • "Edit Date" - A date/time field, with time enabled.
  • "Object" - A connection field to original object you want to track. This will enable us to Insert a connected record from this object.
  • All of the original fields found in the original Object. You can either manually add the fields or copy them from the object you're creating the history for.
  1. Add Record Rules to Update the Edit Log

Next we want to update the Edit Log object when forms are submitted in the live app. To do this, we will use record rules in the form view.

Navigate to the form you want to track updates from, and add record rules by editing the view.

Add Record Rules with the following settings:

  • Action: Insert a connected record: a new Edit Log record connected to this record
  • When: Every form submission
  • Values:
    • "Edited By": Set to the logged-in User
    • "Edit Date": Set to the current date
    • "Item Name": Set to the form value of Item Name.
      • This is one of the fields found in the original object. Do this for all of the fields you're tracking.
  1. Add a Table View for the Edit Log

Now you can add a new table view, showing the Edit Log records. In the example below, we add a table showing the Product - Edit Log records connected to the Product object:

This table will then show all connected Edit Log records, when viewing a Product's details.

How did we do?

Track When Records are Created and Updated

Use Zapier to Insert Connected Records

Contact