Help

Re: Data from previous record automatically populates into a new record

703 2
cancel
Showing results for 
Search instead for 
Did you mean: 
JacobP
4 - Data Explorer
4 - Data Explorer

I’m currently working on a setup where I need to reference data from the previous record in my Airtable base. Specifically, I want to pull data from fields in the previous entry to use in calculations for the current record.

Here’s what I’m trying to achieve:

I have a field called Current Tank Level in each record.
I want to automatically populate a field called Previous Tank Level in the current record with the value from Current Tank Level of the previous record.


I’ve tried setting up linked records and using rollup fields, but I'm facing challenges with automating the process to ensure the Previous Tank Level field always reflects the correct value from the previous record.

 

How am I able to grab the previous record entry "Tank Level value" and automatically add it to my "Previous Tank Level" record?

3 Replies 3

Hiya, I think you're on the right track with the linked record.

Make a link field to the same table. You can title this "Previous Data". Make a Lookup field that shows the specific fields you want to display. This is the "Previous Tank Level".

I'd probably unselect the option to link multiple records in the link field. Otherwise, you can end up with multiple entries in the "Previous Tank Level" field.

Here's a screenshot of what I mean:

Sistema_Aotearo_0-1721776707046.png

Let me know if this helps 🙂

 


Justin Ng
Programme Coordinator at Sistema Aotearoa
https://www.sistemaaotearoa.org.nz/

Can you think of away to use an automation to select the previous record?

Blake_D
6 - Interface Innovator
6 - Interface Innovator

This may depend on how you are labeling the records. If you have the records auto numbered then you may be able to set up an automation that when a record is created. 

Create the formula field "Previous Level ID" here is the formula: ID-1 This will get the previous entry ID number.  

Then you will set up the automation where when a record is created it searches for records matching the previous ID. Then it updates the linked field "Previous Level Entry" with the matching search. Having the lookup field for the previous level should make everything happen you were asking for. 

Here are some screenshots. If you have any questions feel free to ask.

Tank 1.png

Tank 2.png

Tank 3.png

Tank 4.png

Tank 5.png