Help

Re: New beta: button field

2739 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Stephen_Suen
Community Manager
Community Manager

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

Button fields in grid view

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.

Button field settings_ label, style, action, and more

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}.`);
30 Replies 30

Welcome to the community, @Balint_Drahota! :grinning_face_with_big_eyes: Check your Airtable login. The only reason I can think of that would give you such a short list of options is if you’re not logged in as an editor.

OMG yeah, that was the case :grinning_face_with_big_eyes:

Raimundo_ladron
4 - Data Explorer
4 - Data Explorer

Hi! This is a great feature!

¿Why is the button disabled when the view is shared, either by link or embeded?

Hi Kasra, I’d hope the button could be enabled in shared view. Any workaround?

Hey @Hari_Balasubramanian! How did you enabled the button in the shared view?

Buttons are another field type now like Long Text , Date , Number etc . I think it has come out of Beta and you must be able to see it in the field types.

Buttons work in shared views, but it depends on the button mode you’ve selected. If the button simply opens a URL, it works fine. However, if you have the button set to run a script or interact with a block, it’s probably not going to work.

Greg_Lhotellier
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello everyone,

I’d like to use a button triggering a script in a shared view. It seems that it isn’t possible, probably for security / session reasons.

So what would be the easiest way to achieve the same behaviour? (having a button in a shared view that triggers a script) :thinking:

I guess API allows that but it means that I have to design the page, host it, populate it and call the API which is way more work :grinning_face_with_sweat:

One workaround is to have the button launch a form that is profiled with info for the target record. Then the user submits the form, which creates a new record. Then have an automation run the script based on the info in the form.

Greg_Lhotellier
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello kuovonne,

Thanks for your reply!

This is the way I started doing things, but sadly it makes the UX very clanky… I hope we’ll be able to do that someday!