Re: How can I bulk update records in a table through scripting?

2475 0
Showing results for 
Search instead for 
Did you mean: 
6 - Interface Innovator
6 - Interface Innovator

Folks, I need to make a simple action: When a form is submitted, I need to automatically update a field on all the records on one view to a specific value.

How can I do this through scripting?

5 Replies 5

Welcome to the Airtable community!

It depends on your current scripting ability.

Do you already know JavaScript? Have you looked at the scripting documentation?

Do you already know how to break down the logic of the script, but need help identifying the specific function calls? Or do you not know where to start at all?

6 - Interface Innovator
6 - Interface Innovator

I have already grasped on how to open a table and a view, how to go through the records to update them 1 by one.
The problem is that by doing this this way, the script goes over the 30s limit and stops…
Is there a command/property on the view object to do this is a bulk way, like we do with TSQL?

You need to update records in batches using updateRecordsAsync (note the s) instead of one by one.

You can see one method of doing batch updates in this example.

6 - Interface Innovator
6 - Interface Innovator

Thank you for your effort, but your solution is basically doing something similar as what I am trying to escape from: going through all the records to add them to an array and then work them out…
What would really work was to have a sole instruction/command which would update all records with a specific value on a specific field, or to be able to run an extension.

Hi there Quero Emigrar
Did you find another way to update all records?