Nov 24, 2023 01:49 AM - edited Nov 24, 2023 02:25 AM
Hello everyone 🙂
I have a large number of automation scripts, some of which are quite complex. However, developing the scripts is relatively tedious because the script editor gives a limited view of the code (and it lags behind a “real” IDE, e.g. no copilot etc). There is also no version control.
I currently develop our scripts this way:
However, copying back and forth is error-prone and tedious.
My questions to the community:
Thank you very much!
Nov 24, 2023 04:00 AM - edited Nov 24, 2023 08:47 PM
Hello @mainway
I can understand what you feel about Airtable's script editor and it's the same story for almost every Airtable expert.
But we can't able to go to another IDE for airtable script because
1. All the Airtable-related functions and syntax suggestions are available here only.
2. While we do it outside we couldn't do a quick test.
3. For managing version control I think we can use Git and if the script is small then store it on the Local(or Clouds) system as a file.
For now, they think the script is mostly used as an extra option. When it will be used as a primary option(step) for most people then airtable thinks to give more features on it.
Nov 24, 2023 08:20 AM
I also use an external editor and git, and copy back and forth.
I always copy the entire script back and forth, even if I changed only one small thing in one line.
If I haven’t touched a script in a while, I copy the script from Airtable to my code editor and run a diff with the version in my code editor. That way I know if someone made an unauthorized change to the production script, or if I forgot that I am in a different branch.
To answer you other question, no, it is not possible to hide the left and right panels of the automation script editor.
Nov 24, 2023 06:45 PM
I do it the similar approach. I manage complex formulas, scripts and extensions in GIT and code them in VS CODE.
I see that in the Airtable editor, it's now possible to edit multiple points by Ctrl+D or ALT+click. They are making an effort.
Also, the recent formula editor in the field is difficult to use because the suggestions are forced.
Feb 06, 2024 03:04 PM
Hello everyone,
I'm also trying to run the Airtable scripts outside Airtable. The main reason is that I have some complex data transformation logic that is getting more and more complex and I want to be able to unit test it using Jest and maintain the history of my changes on GitHub.
Has anyone been able to do that? I'm struggling to get Jest to execute the script as it doesn't recognise (as expected) things like input.config() or base.getTable().
I was wondering if there is any "mock library" available that I could import to my scripts (only during tests) that could emulate some of the Airtable objects.
Do you know any examples of unit testing Airtable scripts?
Thanks
May 19, 2024 09:40 AM
I also have the same question: did anybody managed to create a "mock library" to be able to develop and execute code locally ?
The execution part would be to test and validate that the code is working as expected, in production it would still be run inside airtable. The copy/paste part doesn't really bother me, it's more that I would like to be able to use debugger and the full functionalities of an IDE when developing complex formulas.