I really like Airtable and the fact there is a community forum is amazing! I found this example https://github.com/nicroto/airtable-scripts/blob/master/update-stock.js and I’m trying to play around with it in the code editor. Although I’m stuck on nomenclature. With base.getTable, do I use the name of the base? I’m getting an error even trying to run the example. Thank you in advance for any and all help.
Hi Devon, and welcome to the community!
As indicated in the docs, a
Base provides an entry point to all of the data in a given base. There is only ever one base available — the base that’s open and in which your scripting block is written or installed. It can be accessed via the
base global variable.
As such, a simple snippet like this … opens the “Airdrop” table and reads all of the records into an object.
let table = base.getTable ("Airdrop"),
records = await table.selectRecordsAsync ();
The next line allows you to inspect the records object. The rest is uphill all the way, like golf.
Thank you for the welcome and thank you for the response! I’ll work on this.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.