Skip to main content

Hello, I work with ships and would like to create a grams/day formula which takes the date from our last interaction (order) with that ship to measure from. I cannot work out how to have it search for the previous record to take that as the date to give the days passed value for the equation.

Anyone have any tips?

Hey ​@Abigail0102,

 

Airtable works in a different way! You cannot reference a different record on a formula. To solve this, you’ll need to link the records (either manually or via automation) and have a lookup for the date field. For more info on lookups you can take a look at this article. 

Only then you’ll be able to use such date on your formula! 


Mike, Consultant @ Automatic Nation


Does this look right?  I’ve set it up here for you to check out.  We can’t use formula fields for this so I ended up using a linked field + automation to handle it, and the automation looks for the latest ‘Interaction’ record for the selected Ship and links it together

The caveat here is that it assumes the record you’re running it on is always the latest record though, i.e. if you ran the automation on a record for 1 June, and you had another unlinked record for 2 June, then it’d link to the 2 June one instead



The automation’s kind of tricky to set up and requires a Scripts action; you can duplicate the base into your own workspace to copy the automation settings so you should be good!

 


Even though Airtable looks like a spreadsheet, it is really a database. In a database, each row is separate. Airtable formulas only work with data in the same row.

That means if you want to use the record before, you will need to do a few extra steps. I have written a detailed article on how to do this, you can check it out.

Taha, Airtable Advisor


@TheTimeSavingCo  this looks like what I want but I have been trying for a couple of hours now to set it up in my own base but I don’t understand how the automation links to the field you have laid out? Sorry I do not use automation so I have no idea


@Taha-Jiruwala thanks I tried this but could not get past step 3 as there is no obvious way to manually link each record, I also have over 500 records to link so doing this manually is not an option


If you DM me an invite link to your base I’d be happy to help you take a look at it!


Reply