# Automatically delete sub-categories when the over-category is deleted

**URL:** https://community.glideapps.com/t/automatically-delete-sub-categories-when-the-over-category-is-deleted/35390
**Category:** Ask for Help
**Created:** [December 2, 2021, 12:14pm UTC](https://community.glideapps.com/t/automatically-delete-sub-categories-when-the-over-category-is-deleted/35390 "2021-12-02T12:14:06Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Waser\_I\_Solutions](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/waser_i_solutions/32/34937_2.png) [@Waser\_I\_Solutions](https://community.glideapps.com/u/Waser_I_Solutions)
#### Post date: [December 2, 2021, 12:14pm UTC](https://community.glideapps.com/t/automatically-delete-sub-categories-when-the-over-category-is-deleted/35390/1 "2021-12-02T12:14:06Z")

</div>

I have a worksheet with vehicles, one with associated tire sets and one with associated individual tires (front right, front left, rear right, rear left).

I would like to manage if a set of tires is deleted, then all associated tires should be deleted automatically. and if I delete a vehicle, then all associated tire sets and associated tires should be deleted. with the native delete button from glide, i can’t find any triggers that could do that. Or am I missing something?

---

<div class="post-metadata">

### Author: ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)
#### Post date: [December 2, 2021, 1:12pm UTC](https://community.glideapps.com/t/automatically-delete-sub-categories-when-the-over-category-is-deleted/35390/2 "2021-12-02T13:12:05Z")

</div>

Have you ever tried the custom actions?

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [December 2, 2021, 2:25pm UTC](https://community.glideapps.com/t/automatically-delete-sub-categories-when-the-over-category-is-deleted/35390/3 "2021-12-02T14:25:26Z")

</div>

Cascading delete is not supported in Glide. To do this, at the moment you must have your data in Google Sheets, then use an Integromat to support it.

Let’s say you have a vehicle ID that is also present in your Tire Sets and Tires sheets. When you delete the vehicle, pass the vehicle ID to a webhook in Integromat. Then find all rows that have the same ID in your Tire Sets and Tires sheets and delete them.

---

<div class="post-metadata">

### Author: ![christoph](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/christoph/32/22794_2.png) [@christoph](https://community.glideapps.com/u/christoph)
#### Post date: [December 4, 2021, 6:10am UTC](https://community.glideapps.com/t/automatically-delete-sub-categories-when-the-over-category-is-deleted/35390/4 "2021-12-04T06:10:21Z")

</div>

What about not deleting but only hiding the associated rows. If you have a show status column in your table vehicle you do a lookup in the table tire sets and change the show status of each row using an if-else column.

---

<div class="post-metadata">

### Author: ![Pratik\_Shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pratik_shah/32/12416_2.png) [@Pratik\_Shah](https://community.glideapps.com/u/Pratik_Shah)
#### Post date: [December 4, 2021, 8:38am UTC](https://community.glideapps.com/t/automatically-delete-sub-categories-when-the-over-category-is-deleted/35390/5 "2021-12-04T08:38:33Z")

</div>

I have done something similar to this. Based on lookup and relations, and using visibility condition, you can hide individual tire set, if set of tires is empty. Similarly, if vehicle is deleted, other relevant details will be hidden.
