How and When to use Snapshot Fields | BEGINNER
A snapshot field takes the value of a lookup field and captures that value on the child record at the time its created. The purpose of the snapshot field is to prevent the child record’s value from changing, even when the parent record’s value is changed.
For example, let’s say you want to use employee time cards to calculate total labor costs on a time card record. In this case you would relate time cards to employee records and use a lookup field to find the employee’s hourly wage in order to calculate the labor cost.
There is just one problem with this method: If the employee’s hourly wage changes next month, the labor cost of all past time cards will also update. In this case you can use a snapshot field to store the hourly wage at the time the record is created and prevent it from changing in the future.
To create a snapshot, simply follow these steps:
- Set up a relationship between your employees table and the time cards table as pictured above
- Use a lookup field to bring the hourly wage from the employee table onto the corresponding time card record
- Create a new field with the same ‘Type’ as your lookup field, in this case ‘Currency’ because we are bringing in their hourly wage rate
- Open your new field and go to the ‘advanced’ section at the bottom of the field setting
- In the section labeled ‘snapshot’ check the box to enable the snapshot feature
- Select the field you want to take a snapshot of. In this case ‘Employee – Wage’
- Click ‘Save’. You are good to go with your new snapshot field.
You can now use your new snapshot field as a source of truth for the labor cost on a timecard at the time the labor was undertaken.
Stay tuned for more examples of great ways to use snapshot fields. In the meantime checkout our other fields & formulas articles here.
- Author: Jake Rattner (email@example.com)
- Date Submitted: 12/19/2018