Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Limit view to oldest entry in table

Topic Labels: Views
164 4
cancel
Showing results for 
Search instead for 
Did you mean: 

I’ve read a lot of support articles, all seem overly complicated for what I’m trying to do:

I have a simple table, one of the fields is CreatedTime, another is a checkbox called Used.

New records are constantly being added to the DB, at intermittent intervals.

At other intermittent intervals (slower pace than the above), a trigger will cause Used to get checked.

At which point, what I’m trying to do is have the “Oldest entry that is not Used” be visible in a view.

Seems like this should be dead simple, but I am stymied. Help?

4 Replies 4

Within a Table, you’d have a Name Field, the “Created Date” automatic Field, and a Used Check-Box Field.

image

Filter the “Used” column to display unticked records;

image

And sort by Created Date field;

image

Keen to understand if this doesn’t work, what’s not working about it.

Sometimes things that are easy to explain in English are hard to implement in the constraints of Airtable. It sounds like you are trying to create a first-in-first-out system.

Two approaches come to my mind

  • I would do this with a scripting automation. When a record is marked as used, have a script search for the oldest unused record and mark it. This method requires having someone with the ability to write a script.

  • Another option is to use a control table with a single control record. All new records are linked to this control record and a series of back and forth rollups identifies the oldest record. When a record becomes used, it unlinks itself from the control record. Normally I don’t like this method if there could get thousands of linked records, but if the queue stays at a manageable level and you have enough automation runs to support the system, it is a no-code method that works.

I think it hinges on whether or not the view should include only the oldest unused record. In your view, the user sees all the unused records with the oldest as the first in the list.

So for a View to only show the eldest record that’s not used, I’ll suggest adding one extra tick field called “Eldest Record”, and an Automation checks all records, and ticks the eldest record that meets the criteria.