Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Sep 29, 2024 08:07 AM
I've been working with scripts and have been loving it. I know the answer to this is probably no, and would be nice to have, but not a huge thing but....
Is it possible to have a some common functions that I write shared across other scripts I use in my base? I can continue to just copy/paste them in the scripts I need. I know it goes against the ethos of low-code, I just have a few I use a lot.
Solved! Go to Solution.
Sep 29, 2024 09:33 AM
No, you cannot easily share code between scripts. Keep copy/pasting. You can format your code so that it is easy to copy/paste a set of common functions in bulk when you want to update it.
Some people have experimented with things like storing code externally in a table or on a third party service, and then using eval(). However, eval() is not supported in automation scripts. Plus, putting code where it could be accidentally messed with by other people is just asking for trouble.
I personally find that over the years, I tend to have fewer and fewer common functions across scripts.
Sep 29, 2024 09:33 AM
No, you cannot easily share code between scripts. Keep copy/pasting. You can format your code so that it is easy to copy/paste a set of common functions in bulk when you want to update it.
Some people have experimented with things like storing code externally in a table or on a third party service, and then using eval(). However, eval() is not supported in automation scripts. Plus, putting code where it could be accidentally messed with by other people is just asking for trouble.
I personally find that over the years, I tend to have fewer and fewer common functions across scripts.