Deleting related fields from another table

I have 2 tables linked, one with job information (primary) and one with finance, when i delete one from the job information table the finance table still has its relevant data (information not linked to original).

Is there a way of automatically deleting the one when the other is deleted?

Thank you

There’s no built-in way to do this. This can only be done with a custom JavaScript (which you could automate via Airtable’s Automations), or with an external automation tool like Make.com, or manually.

1 Like

Hey Aaron, as @ScottWorld said, you can run a script in an automation to delete a record once it’s no longer linked if you’re on a Pro plan. Here’s a working version of said script that you’ll need to customize:

let inputConfig = input.config()
let table = base.getTable('Table 2')

table.deleteRecordAsync(inputConfig.recordId)

automation delete

If you’re not on a Pro plan, the best you could do is clear the fields I’m afraid:

automation clear

I’ve set up both here for you to check out

1 Like

Thank you for the clarification… Not going to lie… at this stage thats beyond my capabilities :joy:

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.