So today I wanted to get a “Mark Duplicate” script up and running on a base. Turns out its one of the featured examples. So I copied the code, adjusted it for my base and hit test and it didn’t work.
The error reporting is rubbish - so I have no idea what went wrong and logging variables doesn’t work.
This is the second time in 3 months I have tried to use the scripts block. I can’t say I am enjoying it, its slow and has no failure message (primitive stack trace)
So my question is - how are others working with this productively. Because at the moment this absolutely sucks and I’d be better off using zaps.
Welcome to the Airtable community!
I’m sorry that you are having a difficult time using scripting. You don’t say what your coding background is, so it is difficult to give advice on how to use scripting. It looks like you are using scripting with automations. I recommend starting out using Scripting App. I find testing and debugging much easier in Scripting App. Automation scripts have more moving parts than Scripting App, such as ensuring that you have the proper trigger record when testing.
I personally enjoy using scripting, but it took me writing several scripts and reading a lot of documentation before I became comfortable writing scripts.
Thanks for getting back to me. I should of said I am a full stack developer with 5ish years in isomorphic js.
Ironically I think this is what makes me less patient with these kinds of tools :rofl:
Ok that’s a good piece of advice of using the scripting app before the automation.
But could you do me a favour and confirm that the “mark duplicates“ example script actually works as a copy paste of in an automation. Because from my perspective it looks broken.
And is there no way to get the line reference that failed. “Test failed” is essentially just a gas lighting system against all devs :slightly_smiling_face:
Sorry two different accounts there. Ones the company “root” account
I typically create an internal logging process that [optionally] stream errors out to another table in the same base using try…catch.