- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 16, 2020 08:13 AM
I’m using the API to update an Airtable table on a daily basis. Everyday I’d get around 100 records to be updates or created on the table.
What’s the best way to tell Airtable to either update the record if a specific field matches a record which already exists otherwise create a new one?
Do I need to perform a search for each one of the records manually or is there a better way to do that?
Thanks!
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 16, 2020 08:17 AM
Hey there! Best way to do this is by searching for the value in the field, and creating logic that says “if this exists” update else create.
You wouldn’t need to loop through every value, you would just create a view based on the value you were searching for.
For example:
You would use filterByFormula
in the request to look for records that matched your specific criteria
Hope that makes sense.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 16, 2020 08:17 AM
Hey there! Best way to do this is by searching for the value in the field, and creating logic that says “if this exists” update else create.
You wouldn’t need to loop through every value, you would just create a view based on the value you were searching for.
For example:
You would use filterByFormula
in the request to look for records that matched your specific criteria
Hope that makes sense.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 16, 2020 12:34 PM
Thanks!
That’s what I had in mind. I was wondering if there was a More automatic way to accomplish that without having to search (filterByFormula) for every record (not value) I’m about to add. Something like Typecast but for adding/updating records.
Thank you!