# In custom action, when removing 'if' from the main logic root, every action under it is removed

**URL:** https://community.glideapps.com/t/in-custom-action-when-removing-if-from-the-main-logic-root-every-action-under-it-is-removed/36467
**Category:** Project Showcase
**Created:** [December 29, 2021, 4:19pm UTC](https://community.glideapps.com/t/in-custom-action-when-removing-if-from-the-main-logic-root-every-action-under-it-is-removed/36467 "2021-12-29T16:19:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)
#### Post date: [December 29, 2021, 4:19pm UTC](https://community.glideapps.com/t/in-custom-action-when-removing-if-from-the-main-logic-root-every-action-under-it-is-removed/36467/1 "2021-12-29T16:19:47Z")

</div>

In custom action, when removing ‘if’ from the main logic root, every action under it is removed. I tried to add some ‘if’ logic, then decided it would be better w/o the ‘if’. To my surprise, all the custom-coded stuff after the if was removed! Seems to me, just remove the if. Why the cascading delete? I had some pretty complex stuff in there.

This also brings up that there is no way to “undo” an action in Glide. Now I know in this case I could have just not saved. But reflexes…

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [December 29, 2021, 4:24pm UTC](https://community.glideapps.com/t/in-custom-action-when-removing-if-from-the-main-logic-root-every-action-under-it-is-removed/36467/2 "2021-12-29T16:24:26Z")

</div>

There’s a little trick to that, but it’s not obvious. Instead of clicking on the delete button which deletes the entire IF branch, click on the minus sign next to the if condition. If there are no conditions, then the IF will go away, but any actions below it should stay.

---

<div class="post-metadata">

### Author: ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)
#### Post date: [December 29, 2021, 4:26pm UTC](https://community.glideapps.com/t/in-custom-action-when-removing-if-from-the-main-logic-root-every-action-under-it-is-removed/36467/3 "2021-12-29T16:26:36Z")

</div>

Thank you so much!

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [December 30, 2021, 4:26pm UTC](https://community.glideapps.com/t/in-custom-action-when-removing-if-from-the-main-logic-root-every-action-under-it-is-removed/36467/4 "2021-12-30T16:26:53Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
