Create A Script
Scripts allows you to create, reuse, edit, save, and deploy individual JavaScript code scripts to your Airtable bases. With Scripts, you can manage and add JavaScript code to your Airtable bases, you can input one or multiple Snippets into Scripts, then add multiple Scripts to create Blocks. Blocks is a collection of all your Scripts with enhanced capabilities.
Learn more in On2Air: Scripts Overview
Learn more about creating Snippets
Learn more about creating Blocks
In this article:
Create a New Script
Insert Snippets Into Your Script
View and Edit Snippet Code Inside Script
Rename Your Script
Edit Your Script
View All Snippets Inserted to Script
View All Blocks Where Your Script Is Being Used
Script Settings
Version History
Create a New Script
Click Scripts on the left-side menu
Click New Script
Add your JavaScript code in the text box in the Script tab
Click Save Script
To enable your Script, toggle the Disabled switch to Enabled

Insert Snippets Into Your Script
You can add one or multiple Snippets to your code.
Select the location in your Script where you want your Snippet to be added
Click Insert Snippet to Script
In the popup box, select the Snippet you want to add to your Script
Click Insert Snippet
- A comment is inserted into your Script containing a unique Snippet ID and the title of your Snippet
Click Save Script
To enable your Script, toggle the Disabled switch to Enabled

View and Edit Snippet Code Inside Script
You can view and edit your Snippet code inside your Script. It will be updated in your original Snippet.
To view the code in the Snippet, toggle the View Snippet switch
If you need to make changes to your Snippet, you can make the changes directly from the text field. The Snippet will be automatically updated in the original Snippet.

Rename Your Script
You can rename your script by clicking New Script in the title field and typing a new title
When you click out of the field, your name will be automatically saved

Edit Your Script
You can edit your Script at any time by changing it in the text field
When you are finished changing it, click Save Script
On2Air: Scripts is not a debugger. Please test your code in Airtable before adding to Scripts.

View All Snippets Inserted to Script
You can see all Snippets inserted into your *Script*
Scroll below your text box to see Snippet Usage and a list of Snippets
Click View Snippet to be directed to your original Snippet

View All Blocks Where Your Script Is Being Used
View a list of Blocks where your Script is currently being used
Click Settings
View Block Usage box and a list of Blocks
Click View Block to be directed to your original Block

Script Settings
Block Usage
View a list of Blocks where your Script is currently being used
Click View Block to be directed to your original Block

Code
A unique ID is generated for each Script. Click Refresh at any time to generate a new ID.
Delete Script
If you no longer want a script, click Delete Script
Verify deletion by clicking Yes, I want to delete this script
WARNING: Deleting a script cannot be undone.

Version History
You can save each version of your Script. You can also choose to create a version that includes the Snippets you have in your Script.
To save a Script
Under the Script tab, enter your Script in the text box
Click New Version
Use the automatically filled Version ID or add your own
Add a Description
If you would like to save the Snippets you've included in your Script also, click Automatic Versioning if the child Snippet has changes
If there have not been any changes in your Snippet since the last version, it will keep the same Snippet version
Click Create New Version

Please note, this will not automatically save each version of your Script. You must manually create a new version.
To view Version History
Click the Version History tab
Click the Version you would to view
If Snippets are included in your Version, you will see the name listed with a timestamp

Scripts allows you to create, reuse, edit, save, and deploy individual JavaScript code scripts to your Airtable bases. With Scripts, you can manage and add JavaScript code to your Airtable bases, you can input one or multiple Snippets into Scripts, then add multiple Scripts to create Blocks. Blocks is a collection of all your Scripts with enhanced capabilities.
Learn more in On2Air: Scripts Overview
Learn more about creating Snippets
Learn more about creating Blocks
In this article:
Create a New Script
Insert Snippets Into Your Script
View and Edit Snippet Code Inside Script
Rename Your Script
Edit Your Script
View All Snippets Inserted to Script
View All Blocks Where Your Script Is Being Used
Script Settings
Version History
Create a New Script
Click Scripts on the left-side menu
Click New Script
Add your JavaScript code in the text box in the Script tab
Click Save Script
To enable your Script, toggle the Disabled switch to Enabled

Insert Snippets Into Your Script
You can add one or multiple Snippets to your code.
Select the location in your Script where you want your Snippet to be added
Click Insert Snippet to Script
In the popup box, select the Snippet you want to add to your Script
Click Insert Snippet
- A comment is inserted into your Script containing a unique Snippet ID and the title of your Snippet
Click Save Script
To enable your Script, toggle the Disabled switch to Enabled

View and Edit Snippet Code Inside Script
You can view and edit your Snippet code inside your Script. It will be updated in your original Snippet.
To view the code in the Snippet, toggle the View Snippet switch
If you need to make changes to your Snippet, you can make the changes directly from the text field. The Snippet will be automatically updated in the original Snippet.

Rename Your Script
You can rename your script by clicking New Script in the title field and typing a new title
When you click out of the field, your name will be automatically saved

Edit Your Script
You can edit your Script at any time by changing it in the text field
When you are finished changing it, click Save Script
On2Air: Scripts is not a debugger. Please test your code in Airtable before adding to Scripts.

View All Snippets Inserted to Script
You can see all Snippets inserted into your *Script*
Scroll below your text box to see Snippet Usage and a list of Snippets
Click View Snippet to be directed to your original Snippet

View All Blocks Where Your Script Is Being Used
View a list of Blocks where your Script is currently being used
Click Settings
View Block Usage box and a list of Blocks
Click View Block to be directed to your original Block

Script Settings
Block Usage
View a list of Blocks where your Script is currently being used
Click View Block to be directed to your original Block

Code
A unique ID is generated for each Script. Click Refresh at any time to generate a new ID.
Delete Script
If you no longer want a script, click Delete Script
Verify deletion by clicking Yes, I want to delete this script
WARNING: Deleting a script cannot be undone.

Version History
You can save each version of your Script. You can also choose to create a version that includes the Snippets you have in your Script.
To save a Script
Under the Script tab, enter your Script in the text box
Click New Version
Use the automatically filled Version ID or add your own
Add a Description
If you would like to save the Snippets you've included in your Script also, click Automatic Versioning if the child Snippet has changes
If there have not been any changes in your Snippet since the last version, it will keep the same Snippet version
Click Create New Version

Please note, this will not automatically save each version of your Script. You must manually create a new version.
To view Version History
Click the Version History tab
Click the Version you would to view
If Snippets are included in your Version, you will see the name listed with a timestamp

Published on: 05 / 28 / 2020