Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

Global Fields for Reuse

cancel
Showing results for 
Search instead for 
Did you mean: 
Alex_Murillo
5 - Automation Enthusiast
5 - Automation Enthusiast

As far as I can tell, Airtable does not offer the ability to create global fields (within an Account) that can be reused across all Bases. This is a critical feature if I’m going to create a Field that would essentially be reused in multiple Tables across multiple Bases.

The primary idea for a Global Field is to create it once, and reuse it multiple times. Additionally, if I add/remove items in the field (e.g. a Select Field type) then all tables using that field would be updated automatically.

I realize I could create a template and then all future Bases could be created from that table, and hence include that field, but this does not cover the field update scenario.

2 Comments
David_Deborin
4 - Data Explorer
4 - Data Explorer

Have you found a workaround solution to this? I’m having the same problem.

I want to be able to call scripts in other scripts. Essentially, some sort of global function or variable capability would be a HUGE game-changer. This is essential for developers who plan on writing many scripts.

I made a post about this just now - here’s the link, maybe we push the Airtable team to do something about it:

Avana_Vana
6 - Interface Innovator
6 - Interface Innovator

I believe you could just create a table, and store each field in the table as rows containing columns for the field’s name, its type, its options, and its description (if you need it), as JSON, and then in your script you just retrieve each column’s values, and use JSON.parse() to convert the stringified JSON text stored in the column to JavaScript objects, for instance, the column’s configuration options, and then you just call table.createFieldAsync(name, type, JSON.parse(options), description) to create the field.

My use case for global variables is more basic. I have several scripts that utilize API calls to the same base URL, and sometimes I need to change the baseURL. As I have more than 3 dozen automations and apps in one base, this can be very tedious and error-prone. It would be so much easier to just be able to define custom global variables, alongside the built-in globals like session, base, etc.

I mean, I could do something similar to what I proposed above, by just making a new table called “Global Variables” containing 2 columns, key and value, and then just get the globals from that table, but this requires adding a whole new asynchronous table lookup call to the script—just feels like overkill for such a basic need. Also, my base is open to the public and I don’t want to expose the back-end guts of the automation to the public. I can’t believe they haven’t implemented a way to hide certain tables according to permissions yet.

But yes, global variables would be extremely, extremely useful and I feel it’s just a basic, necessary feature.