Nov 29, 2020 07:04 PM
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.
Nov 29, 2020 10:58 PM
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.
Nov 29, 2020 11:19 PM
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
Nov 30, 2020 07:02 AM
Thanks for providing more info on your background. It can be frustrating trying to code in a new environment that doesn’t have all the tools that you are used to using.
The “Mark duplicates” example runs fine for me.
Nov 30, 2020 09:06 AM
I typically create an internal logging process that [optionally] stream errors out to another table in the same base using try…catch.