Help

UI behavior with script runs?

Solved
Jump to Solution
2242 5
cancel
Showing results for 
Search instead for 
Did you mean: 
augmented
10 - Mercury
10 - Mercury

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:

Thanks!

1 Solution

Accepted Solutions
Zack_S
8 - Airtable Astronomer
8 - Airtable Astronomer

Unfortunately, no there is no way to stop it from happening. At least I don’t think this has been changed yet.

See Solution in Thread

5 Replies 5
Zack_S
8 - Airtable Astronomer
8 - Airtable Astronomer

Unfortunately, no there is no way to stop it from happening. At least I don’t think this has been changed yet.

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.

  1. Create a button that causes a field to change to a state that forces it into a new view
  2. Create an automation that is triggered when a record moves into that view
  3. Add your script extension to a script step in the automation and pass the record ID from the trigger step to the script step
  4. 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.

Ha! Crap! I was developing in Coda today and lost my context.