Hi! I have a base with multiple tables in it. I have created a multi-step automation that should work like this:
The automation passes all tests and it DOES successfully duplicate the record in the Archived Grant Projects table. However, it does NOT actually delete the original record in the Complete Data View table. I have tried a bunch of tweaking to get it to work and I’m just lost now.
Here are some screenshots of each step in the automation. Can someone tell me what I’m doing wrong?
Where did you get this script?
The script is not setup to delete the original record. The script ignores the record id that you are passing it, and simply deletes the first record that it finds in its query.
If you look in the base trash you will probably find the deleted records.
You need to have the script get the record id from the input variable by using input.config()
And you don’t need to run the query in the script.
I actually got this script from another response on these forums, although I clearly didn’t get it right.
But when you say “You need to have the script get the record id from the input variable by using input.config(). And you don’t need to run the query in the script.” I genuinely have no idea how to implement that. I’m a novice at scripts.
I sell a set of “automation helper scripts” that includes a script for deleting the record that triggered the automation.
These are very simple scripts that are designed to help people who are just getting stated as scripting.