Help

Re: Help with multi-step automation

1145 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Ashley_Cain
4 - Data Explorer
4 - Data Explorer

Hi! I have a base with multiple tables in it. I have created a multi-step automation that should work like this:

  1. A record is update in Table 1 (Called ‘Complete Data View’)
  2. That triggers a duplicate record being created in Table 2 (Called ‘Archived Grant Projects’)
  3. Once the record in Table 2 (‘Archived Grant Projects’) is created, that should trigger (via script) the original record in Table 1 (‘Complete DataView’) to be deleted

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?

AirTable Automation - Step 1

AirTable Automation - Step 2

AirTable Automation - Step 3

5 Replies 5

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.

How much are the scripts? And would one of them fix this specific issue?

Nevermind. I just clicked on your link and answered my question. Sorry about that. I’m going to purchase this now.