Sep 22, 2023 01:05 AM - edited Sep 22, 2023 01:07 AM
I am building for the following scenario and need help to understand a few things
1. I have a master table that has the main data (Name, Email id, etc)
2. There is another table with a field (Name) that is linked to the name field in the master table.
3. I designed an interface to delete a record from the master table.
4. Now when I see the linked field in the second table, it has disappeared as it should be. However, the entire record does not get deleted.
5. So currently I have added a check column in the second table to check if the Name field is present or missing and am running an automation through Make to delete the entire record for the second table.
I wanted to know if this is possible through airtable automation itself instead of creating an automation through another tool. Also if this is possible to run the automation through an interface.
Thanks
Sep 22, 2023 04:20 AM
You’ve stumbled upon 2 of the limitations of Airtable: you can’t delete a record through Airtable’s native automation tools, and there is no cascading delete (i.e. delete a parent record, and then all the children records get automatically deleted).
Your only 2 workarounds for doing either of these things are:
1. High-code: Write your own custom JavaScript.
2. Low-code: Use Make’s Airtable automations, which is what you are already doing.
Sep 22, 2023 09:35 AM
Hi @cshenoy86,
You could try setting up an automation within Airtable without using external tools structured in the following way: set the trigger as "when a record matches condition" and look at when the lookup/linked field from the second table is empty - this assumes that the record should never not be linked to the other table - not even upon creation.
If the linking happens as a second step, then you could have another automation that checks when a record is linked and based on that checks a checkbox field - this would then require the trigger for the first automation to be checking for two conditions:
- the checkbox being checked (which means that at some point a record was connected)
- the linked field being empty
I hope this has been helpful to you.
Website: https://alessiomonino.com
Calendly: https://alessiomonino.com/contact
Email: alessio.monino@gmail.com
Sep 24, 2023 08:46 PM
Thank you! Hopefully they come up with the Delete record feature in future.
Sep 24, 2023 08:47 PM - edited Sep 24, 2023 08:51 PM
Yes that is what I did but externally using Make Integromat. I will definitely try it using Airtable automation as well. Thanks for your suggestion! However still for deleting a record, currently there is no automation step available right? One can create, update, find records and send email but there is no action type called 'Delete record'. That I think can be achieved by running a script only.
Nov 13, 2024 01:12 PM - edited Nov 13, 2024 01:13 PM
Hi there!
At miniExtensions, we’ve made it easy to delete specific records in Airtable with our Autodelete records on Airtable automation. This tool allows you to automatically delete records from specific tables and views with as much filtering precision as you need.
Our automations can be scheduled to run at specific intervals, or they can be used as scripts within Airtable, allowing you to trigger deletions based on conditions, such as when a record enters a view, meets specific criteria, or when a button is pressed. Just create one copy of the automation per table that should be scanned when a deletion is triggered and configure the conditions.
In your case, you can mark the records you want deleted in the main table with a checkbox and then trigger the deletion of those records having the miniExtensions automation check for a marked checkbox. To delete the associated records, you can use a conditions to search for non-linked records. Or, if you need to filter it further because you have many unlinked records that don't have to be deleted, you could have a checkbox that indicates that a specific record was linked before (for this, you could use an Airtable automation that updates a checkbox when the linked record field is populated).