Help

Re: Knowing when there is a change to the record

2342 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Ken
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi, when using the API to read the stored records, what’s a good way for the client to know if there’s been updates to the content? Do we have to make the decision ourselves (ie download the whole data and compare), or is there a way to check “last updated”? Sorry if I missed that somehow.

13 Replies 13
Tuur
10 - Mercury
10 - Mercury

:slightly_smiling_face:

I’m also eagerly awaiting the MODIFIED_TIME() and Metadata API features!

But for now, here’s how I find changes:

New Records

Store the RECORD_ID() or the CREATED_TIME() for the last record your application requested. Subsequent requests can specify only records created after that record using the filterByFormula parameter.

Example filterByFormula param to get last known record:
RECORD_ID() = "a89ds790sad8f09ds8f90"

Example filterByFormula param to get records after time:
CREATED_TIME() > "2015-11-11T22:18:17"

Formula field reference

For an overview of formula fields, please refer to the Guide to Formula, Lookup, Count, and Rollup fields. Formulas may involve functions, numeric operations, logical operations, and text operation...


51aada259c4afcfdef2d0ae2df49851022c7a4de.png

Modified Records

The best way I’ve found to handle the identification of modified records is by:

  1. Identify specific fields to “watch”
  2. Request as few records as needed using filterByFormula. For example, for an events application I only retrieved upcoming events that were marked as “active”. This means my application won’t be aware of any inactive or past events, but for my application this was sufficient.
  3. Request as few fields as needed using the fields parameter. This speeds things up.
  4. Update/Patch only the fields that have actually changed. I’ve found debugging and performance to be improved by comparing each field I’m watching and building a new object/array/record using only the fields that have changed. This prevents the submission of values that have not changed and allows your debugging/console messages to be specific and informative. The alternative would be to create a hash of the entire record and if new_hash != old_hash update the whole record. This isn’t bad, just not the route I went down.
Derek_Gau
4 - Data Explorer
4 - Data Explorer

Hi are there any updates to when the ‘created date’ or ‘last modified date’ will be added to Airtable? I have seen in the generated API documentation that it is on the roadmap, but it would be great to get a more tangible update about when this feature would be coming. Thanks!

Any update? Any update at all?

Justin_Ith
4 - Data Explorer
4 - Data Explorer

@Tuur @Chester_McLaughlin Any update on this? Thanks!

Nope. You have to keep track of it yourself. :frowning:

Nicholas_Ewing
5 - Automation Enthusiast
5 - Automation Enthusiast

@Airtable_Team Would love to see this feature as well!

EUGENE_GONCHAR
5 - Automation Enthusiast
5 - Automation Enthusiast
  • 1 for timestamp of record modified feature
Oli_Steadman
7 - App Architect
7 - App Architect

I’ve heard that they are now finished with the beta testing of this feature and that it is being released soon. Exciting times.