Skip to main content

Get previous values action

Read what a record looked like before it changed. Use the old values to log changes, compare them with the new ones, or undo an edit you don't allow.

Written by Leo

Get previous values is an action that loads the previous version of the current record, so later actions can use what the fields contained before the change (the trigger decides when the automation runs, and the action decides what happens). It's meant to help you react to what changed, not only to the new value.

You can use this action for many things, including:

  • Saving the old status of a deal in a history app before the new one replaces it.

  • Putting a field back to its old value after someone without rights changed it.

An automation with the trigger When a record is updated and the marked action Get previous values of the current record

Note:

  • The action needs a changed record. It works on the current record, so it isn't offered after On a scheduled time or interval or When a webhook is received. It's most useful after When a record is updated.

  • It only reads. The action doesn't change anything. Use it together with Update record or Create record.

Who can use the Get previous values action?

  • Automations are available on the Free, Plus, and Premium plans. The number of automation actions per month depends on your plan. See the limits for your plan on our pricing page.

  • To add or change this action, you need to be a workspace admin of the workspace the app is in. You also need full access to every app the automation uses.

Add the Get previous values action

To read the previous values from an automation:

  1. Open the database app on desktop or web and click the automations icon in the top bar (tooltip Create and view automations).

  2. Open an automation, or select New automation and choose When a record is updated.

  3. Select Add action → Get previous values. The step appears as Get previous values of the current record.

  4. Add the action that uses the old values, for example Update record.

  5. Select Create automation for a new automation, or Save changes for an existing one.

Adding Get previous values to a new Expenses automation: choosing the trigger When a record is updated, which reads Expense has changed in Expenses, then Add action, typing previous, and selecting Get previous values, which adds the step Get previous values of the current record

Get previous values settings

The action has no fields to fill in. In its ••• menu, under the headline Settings, you find Continue on error, Deactivate, Turn into, Duplicate, and Remove. There's no Author or Silent, because the action doesn't change records. Learn more about action settings →

Use the previous values

After the action, the old values are available to the actions below it, next to the current values of the record. In a text box, you insert them like any other record value. In the list of values, select the group <record name> previous values, for example Lead previous values. Its entries are marked Previous value.

Get previous values of the current record followed by Update the current record: typing @Amount in the value of Amount shows Amount under Expense and under Expense previous values
  • To log a change, insert the old value in a field of a record created by Create record.

  • To undo a change, set the field back to the old value with Update record.

  • To check what changed, use a filter such as Has changed or Has changed to. Learn more about change filters →

Let's look at an example

Let's say your sales team wants to keep a history of every stage change. Here's how:

  1. Set the trigger to When a record is updated and select the Stage field.

  2. Select Add action → Get previous values.

  3. Select Add action → Create record and choose the Stage history app.

  4. Set Title to the Company field of the lead.

  5. Set Old stage to Stage from the group Lead previous values, and New stage to the current value.

  6. Select Create automation.

The next time a lead changes stage, Stage history gets a record, for example with the title "Acme Solar", Old stage "Qualified", and New stage "Offer sent".

Get previous values errors

  • On a new record, there are no earlier values yet. The step still succeeds and returns the values the record was created with.

  • If the step fails, the run shows the step and its message. Open the automation and click ▷ next to Manual run (tooltip View all runs), or press cmd/ctrl + 1. Each run shows its status, for example Success; select a run to see every step. For all automations, open Runs in the Automation Center and filter by App, Automation, or Status.

Test, pause, or edit the Get previous values action

  • Manual run runs the automation once. Next to Run on, choose the records, then select Start run. If you have unsaved changes, the button reads Save and start run. In a manual run, the action returns the version before the record's last change.

  • To stop only this action, click ••• next to it and turn on Deactivate.

  • To change the automation, open it, select the step, make your changes, then select Save changes.

Learn more

FAQs

Can I get the previous value of one field only?

Yes. The action loads the whole previous version, and you insert only the fields you need in later actions.

Can I use previous values in a filter?

Yes. After Get previous values, conditions such as Has changed are available in Conditional actions for fields of the current record. They check the change that started the run. This only works with the trigger When a record is updated. Learn more about change filters →

Can I see older versions than the previous one?

No, not with this action. Get previous values returns the version right before the change that started the automation.

Can I undo a change with this action?

Yes. Combine it with Update record: set the field back to its old value. Learn more about undoing changes →

Are there other actions I can use?

Yes! Actions can create and update records, add comments, send emails, create PDFs, call other services, and more. See every action in Automation actions →

Are you a developer using the Tape API for automations?

The automation API has its own documentation for developers. Full reference: current_record_get_previous_revision in the developer docs →

Still have questions? Find answers and get help from community experts in the Tape community →

Did this answer your question?