Help

Sharing variables between Scripting Extensions

824 1
cancel
Showing results for 
Search instead for 
Did you mean: 
iragbag
4 - Data Explorer
4 - Data Explorer

Hello, 

I am trying to set up a complex script where I am trying to pull data from three different sources and merge the datasets in Airtable. Additionally, I am trying to enable some CRUD functionality that will allow us to manage the records created. 

Because of the complexity of the code I was trying to abstract the code and make it more manageable over the long run. I was breaking down the data "fetches" from individual sources into their own scripting blocks and then have an additional block where all the CRUD functions are hosted. 

Questions for the community?

1. Is it possible to share variables between Scripting Extensions?

2. Is there some localStorage/Cookie setup I can implement? These cookies cannot be on my browser but rather on the Airtable server so that it can be shared by multiple developers.

Any help or link will be appreciated.  

Thanks in Advance 
R.

1 Reply 1
Jarbs
4 - Data Explorer
4 - Data Explorer

I may be able to answer your 1st question. I've accomplished transferring variables in between automation scripts by using the output.set() function available here: https://airtable.com/developers/scripting/api/output. You'll need to add a key and a value, but then it becomes available for your other scripts to use. You'll probably have to run a test automation at least once to let AirTable know that you're outputting variables.

 

output.set('key', value);

 

Screenshot 2024-03-20 at 10.39.12 AM.png