New beta: button field

Update (June 25, 2020): The button field is now available for all users — read more in our launch blog post: https://blog.airtable.com/now-available-button-field


:wave: Hey all — I’d like to announce the public beta of button field, a new field type that allows you to create buttons that trigger customizable actions. These actions include:

  • Opening a link based on a URL formula
  • Opening a specific record in page designer
  • Opening an embed in the URL preview block
  • Sending emails with SendGrid

Perhaps most relevant to this community — you can use this new field type to run scripts directly from grid view, kanban view, gallery view, and expanded records. This will make scripts more readily accessible to end users and seamlessly integrated with their existing workflows. You can also customize your buttons with helpful labels that describe what your scripts do.

When a script is run from a button, the first input.recordAsync call in the script will use the record the button was clicked from. As an example:

// Change these to match your base.
let table = base.getTable('Table name');
let field = table.getField('Field name');

// When run from a button field, the script skips the prompt
// and automatically uses the button's record.
let record = await input.recordAsync('Choose a record', table);

let cellValue = record.getCellValue(field);
output.markdown(`# You have selected ${value}.`);
11 Likes

This is an awesome addition to Airtable! :slight_smile:

Wow I can’t wait to use this.

Wow ! Here’s june’s gift ?
That’s the way I like Airtable !
Thanks to @Kasra Dev Team, thanks to @Stephen_Suen !

oLπ

Thank you for this new ability to run a script for a specific record when looking at the record! This is awesome functionality and will make many workflows much easier.

The ability to open a specific record in Page Designer is quite nice as well.

It’s great to see all the new things that a button can do. If you ever want to solicit ideas for other button actions, let us know. I’m sure the community has lots of ideas.

1 Like

@Stephen_Suen I’m sure you’ve heard enough about my thoughts on Buttons…

But the last thing I’ll suggest is zooming to a record in the Map Block.

2 Likes

We’d love to hear your ideas! Please leave any feedback/suggestions via this form: https://airtable.com/shr78fy7G3400LC9D

1 Like

Will it be possible to implement the button in forms in order to run the script in the background?

2 Likes

It’s not possible right now - I’ve already tried it (not with a form, but with a public facing shared view). If the button is configured to launch a link, then it works - you can give people pretty buttons to click for links. But if the button is configured to trigger a script, they are disabled in public facing shares.

It’s a bummer, but I get why they did it - if it’s being triggered from a public facing shared view, there’s no guarantee that there’s an instance of the parent base running to receive the script call and process it. Plus, scripts rely on a user session when they run, and people using a shared view or form don’t have a session with Airtable.

1 Like

As @Jeremy_Oglesby mentioned this isn’t possible right now, but I’d love to hear what you’re hoping to do with buttons inside forms.

1 Like

@Jeremy_Oglesby and @Kasra, I would also like to see scripts running in the background! I’m trying to migrate scripts from a google sheet where clicking an icon on the sheet updates a cell value. We use this to create “tallies” for our team in how we are contacted for a request. The buttons are Emails, Phone, Ticket, etc, and they tally for that user into a spreadsheet. We support online Courses at a private university and the data from this simple script has been very valuable. We would love to implement it into AirTable using these buttons, but so far I’m not sure it will work unless the script runs in the background.

@Kasra - One very specific example I have for you:

My wife and I homeschool our children, and we use Airtable to organize our work and put together task lists for our children of the work that needs to be completed (their self-work).

Currently, we just log in to Airtable with our own accounts and have our children work with a filtered view to access links we’ve provided, download PDF’s, and check off the work they complete with a checkbox field. We don’t really want to pay for them as “Pro” collaborators, because this is the only thing we have them using Airtable for right now.

It would be great if I could just provide a shared view for them to work off of - they could still access links and download PDF’s they need, and then it would be nice if I could provide a button they could click that would trigger a script to 1) check the checkbox field to mark the assignment as done, and 2) depending on if the assignment is marked as needing to be uploaded to our schooling system, create a task for me in a different table to upload the assignment.

This would allow us to give our children the ability to interact with our base in only the very specific way we want them to, without risking our data or the structure of our base by opening it up to them.

In other words, I want to use the button field to circumvent your subscription structure :laughing: (this is only partially true… there is a very real weakness in Airtable’s structure when it comes to user permissions and allowing only very restricted interaction - a weakness that is being capitalized on by services such as Stacker)

2 Likes

I would like to be able to fill blank fields of one or a group of fields of a form instead of writing again and again the default value

Great addition! Can’t wait to use it to run scripts from grid view!

This is going to make my life much easier. This is very intuitive for my end users!

1 Like

Thanks for this.
I used this and it is very convenient.
Please see helpgap.com.
It is a simple implementation .
With the Button field it was tough to get these things done easily.
Thanks.

Hey Jeremy,

Did you find a workaround for this checkbox issue? I’m trying to find a way for non-users to interact with my database which would then trigger a script in the background.

Hi @Morgan_Molidor – welcome to the community.

No, there’s no workaround that allows a non-collaborator to trigger a Scripting block. They can only be manually triggered by a collaborator in the base.

Based on the trajectory of Airtable’s recent features, I’m feeling hopeful that they are moving in the direction of deeper integrated automation, but for now Forms are still the only means for a non-collaborator to interact with your base (outside of third-party tools).

1 Like

@Jeremy_Oglesby thanks! I am hopeful too.