I have a button field that runs a script, that calls an external API, and then updates a field in the record. Is there anyway to stop the extension dashboard containing the script from opening (even partially) when the script is run?
I really don’t need my users wondering what’s going on (or poking around for that matter). :slightly_smiling_face:
There currently is no way to hide the extension dashboard when an extension script runs. However, a common workaround is to run the script as an automation script. Trigger the script using an editable field such as a checkbox or a single select. I usually also have the automation script reset the editable field.
An added benefit of this method is that you can also restrict editing permissions for fields that only the automation script should be able to edit.
Yes, there is. You just need to go around the barn twice.
Create a button that causes a field to change to a state that forces it into a new view
Create an automation that is triggered when a record moves into that view
Add your script extension to a script step in the automation and pass the record ID from the trigger step to the script step
Add a final step to the automation that moves the record out of the new view
The button will now silently perform the script.
UPDATE: Per @Justin_Barrett, unlike Coda, buttons in Airtable cannot effectuate a field change in a record without running a script, so I think instead of a button, maybe use a single-select field in step #1? You could even use a checkbox as a button.
Buttons in grid views—which is what I believe the OP is asking about—cannot directly modify field values. Buttons in interfaces recently have been upgraded to allow data changes to specific fields, and they can even trigger automations, but they cannot currently trigger scripts in Scripting extensions.