# I would like to know how to set a complex condition to delete a record

**URL:** https://community.glideapps.com/t/i-would-like-to-know-how-to-set-a-complex-condition-to-delete-a-record/34485
**Category:** Ask for Help
**Created:** [November 14, 2021, 12:29am UTC](https://community.glideapps.com/t/i-would-like-to-know-how-to-set-a-complex-condition-to-delete-a-record/34485 "2021-11-14T00:29:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Juan\_Perez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/juan_perez/32/26552_2.png) [@Juan\_Perez](https://community.glideapps.com/u/Juan_Perez)
#### Post date: [November 14, 2021, 12:29am UTC](https://community.glideapps.com/t/i-would-like-to-know-how-to-set-a-complex-condition-to-delete-a-record/34485/1 "2021-11-14T00:29:26Z")

</div>

Hi, I would like to know how to set a complex condition to delete a record, but that has the following structure to validate the deletion: if ((cond1 and cond2) or (cond3 and cond4)), currently it only allows me to set if cond1 and cond2 and cond3 … and the same if I want to do it with the “or”, but it does not allow me to do a combination of the “and” and the “or”. thanks in advance for the help you can give me.

---

<div class="post-metadata">

### Author: ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)
#### Post date: [November 14, 2021, 1:06am UTC](https://community.glideapps.com/t/i-would-like-to-know-how-to-set-a-complex-condition-to-delete-a-record/34485/2 "2021-11-14T01:06:33Z")

</div>

if-else column do not have that combination, you have to create additional columns to get that logic to work… a little bit of brain exercise 😉

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [November 14, 2021, 2:15am UTC](https://community.glideapps.com/t/i-would-like-to-know-how-to-set-a-complex-condition-to-delete-a-record/34485/3 "2021-11-14T02:15:00Z")

</div>

As Uzo mentioned, you would need multiple if-then-else columns.

- First column:  
– If not cond1, then empty  
– If not cond2, then empty  
– Else `true`
- Second column:  
– If not cond3, then empty  
– If not cond4, then empty  
– Else `true`
- Third column (optional)  
– If first column is true, then true  
– If second column is true, then true

The 3rd column would be optional, just depends on how it’s being used and personal preference.

---

<div class="post-metadata">

### Author: ![Juan\_Perez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/juan_perez/32/26552_2.png) [@Juan\_Perez](https://community.glideapps.com/u/Juan_Perez)
#### Post date: [November 15, 2021, 11:11pm UTC](https://community.glideapps.com/t/i-would-like-to-know-how-to-set-a-complex-condition-to-delete-a-record/34485/4 "2021-11-15T23:11:10Z")

</div>

Thanks for your comments, but I have already solved it, seeing that the information shown in the tab is per record, so I added other calculated columns to the table with the basic information.
