Oct 25, 2022 05:32 AM
Hi all,
I have an error when I reproduce this example: Airtable Scripting
let record = await input.recordAsync(‘Select a record to use’, table);
Throw this error:
TypeError: input.recordAsync is not a function
Does anyone have an idea of what I need to change?
Thanks,
Arthur
Oct 25, 2022 05:44 AM
Are you writing an automation script?
Automation scripts cannot take user input.
Instead setup your script to use input.config()
and automation input variables.
Oct 25, 2022 06:52 AM
Thanks!
I don’t want to take a user input, but I do want to use a script within an automation. I want to send to that script a record from an interface using a button. I thought to use the “When a button is clicked” trigger. But I don’t see a way to get the record as an input.
I saw that post, but I guess it doesn’t concern an interface button.
I guess I can not use a button from my interface but will have to do it directly from the grid with a button field.
Oct 25, 2022 07:19 AM
You can do this. You need to use input.config()
in combination with an input variable to get the record ID of the triggering record. It is documented here. Note that you need to use the version for automations.
Oct 28, 2022 08:11 AM
Hi Kuovonne,
Great, simple and easy indeed. Thank you for your help!