Skip to main content

Hello Airtable Community,

I am trying to run a script from a button in a table and have used the following guide:

https://airtable.com/developers/scripting/examples/recordpicker

https://airtable.com/developers/scripting/api/input (to optimize by filtering on a view)

When the button is used for the first time, it takes a very long time for the script to run; subsequent presses are almost immediate until the next cache refresh, i.e. a few minutes ( then the user have to wait a long time again).

Here are the measured times:

  • Full table 8039 records: 1 min and 49 seconds
  • View 97 records: 1 minute and 6 seconds

Here is the very basic code:

 

 

let table = base.getTable("POI");
let view = table.getView("DA");
let record = await input.recordAsync('Pick a record', view);
if (record) {
output.text(`You picked ${record.getCellValueAsString("POI")}`);
}

 

 

Do you know if there's another solution? I just want the script to run on a specific record. I can't use an independent automaton, because then the user will have to make a choice later on in the script.

With thanks,

Be the first to reply!

Reply