Best answer

How to find a record in Airtable based on Last Modified value?

  • 17 July 2023
  • 6 replies
  • 154 views

Hello

I’m desperatly looking for a solution to retrieve the last record modified within a timeframe using the “Last modified” timestamp :

-- Paypal paiement date : formatted in “YYYY-MM-DD HH:mm:ss Z (2006-01-22 23:04:05 -0000)” → output {paypal-date}

-- Zapier Action : Find record (Airtable)

-- Search formula : 

AND(

IS_BEFORE(LAST_MODIFIED_TIME(),{paypal-date}) IS_AFTER(LAST_MODIFIED_TIME(),DATEADD({paypal-date}, -15, "minutes")

)

It doesn’t work, what is wrong ?  If you have any idea, would be really helpful

icon

Best answer by Troy Tessalone 17 July 2023, 18:19

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

6 replies

Userlevel 7
Badge +14

Hi @DEEDA 

Good question.

 

Make sure your formula is valid.

There are 6 opening ( and only 5 ) parenthesis.

 

AND(

IS_BEFORE(LAST_MODIFIED_TIME(),{paypal-date}) IS_AFTER(LAST_MODIFIED_TIME(),DATEADD({paypal-date}, -15, "minutes")

)

Thanks for your time Troy,

Indeed I was missing one ‘)’ at the end, but it did not solve the issue.

Here is the example with paypal-date replaced by formatted output

OR

Any idea ?

Userlevel 7
Badge +14

@DEEDA 

It may be that the Time Zone offset needs to be removed from the timestamps. (e.g. +0200)

 

It’s a format suggested by Zapier / cannot find just “YYYY-MM-DD HH:MM:SS” - I’m stucked with this formatting. Any idea? - Which writing would be the right one with “<triggervalue>” or not ?

Isn’t there another way to simply find last updated record from Airtable table ?

Userlevel 7
Badge +14

@DEEDA

Isn’t there another way to simply find last updated record from Airtable table?

Create an Airtable Table View.

Sort by Last Modified (new to old).

Add a Formula Field that has a static value for all records. (e.g. “ZAP”)

Use this Zap action: Airtable - Find Record

Specify the View to use.

Search for “ZAP” in the new column.

The Zap action will only return 1 record.

OK, I wanted to avoid doing such workaroud but if works as well. Thank you very much for your time and help