# Delete multiple rows via button

**URL:** <https://community.glideapps.com/t/delete-multiple-rows-via-button/70801>\
**Category:** Ask for Help\
**Created:** [February 13, 2024, 11:55pm UTC](https://community.glideapps.com/t/delete-multiple-rows-via-button/70801 "2024-02-13T23:55:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tre\_Guerrero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tre_guerrero/32/70314_2.png) [@Tre\_Guerrero](https://community.glideapps.com/u/Tre_Guerrero)\
**Post date:** [February 13, 2024, 11:55pm UTC](https://community.glideapps.com/t/delete-multiple-rows-via-button/70801/1 "2024-02-13T23:55:39Z")

</div>

Hi, is there a way to delete multiple rows from a glide table via a button press? I have users enter daily data and every time they enter data it creates a new row with that data. I would like to give an option for them to clear out all their data via a button press if they wanted to start over. Thanks

---

<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:** [February 14, 2024, 12:09am UTC](https://community.glideapps.com/t/delete-multiple-rows-via-button/70801/2 "2024-02-14T00:09:21Z")

</div>

You can create a query/relation to catch all the rows that fit your condition, and add a button to delete all rows via that query/relation.

---

<div class="post-metadata">

**Author:** ![Tre\_Guerrero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tre_guerrero/32/70314_2.png) [@Tre\_Guerrero](https://community.glideapps.com/u/Tre_Guerrero)\
**Post date:** [February 14, 2024, 12:34am UTC](https://community.glideapps.com/t/delete-multiple-rows-via-button/70801/3 "2024-02-14T00:34:46Z")

</div>

Could you provide an example? I made a relation but it is still only deleting one row at a time. Thanks

---

<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:** [February 14, 2024, 12:44am UTC](https://community.glideapps.com/t/delete-multiple-rows-via-button/70801/4 "2024-02-14T00:44:10Z")

</div>

You need to change your delete action source to use the relation instead of ‘This Item’. Also make sure it’s a multiple relation.

> **[Delete Row | Glide Docs](https://www.glideapps.com/docs/automation/actions/delete-row)**
>
> Delete a row of data from a table.

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [February 14, 2024, 1:05am UTC](https://community.glideapps.com/t/delete-multiple-rows-via-button/70801/5 "2024-02-14T01:05:42Z")

</div>

> [@Jeff\_Hager](#):
>
> Also make sure it’s a multiple relation.

This ☝

---

<div class="post-metadata">

**Author:** ![Tre\_Guerrero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tre_guerrero/32/70314_2.png) [@Tre\_Guerrero](https://community.glideapps.com/u/Tre_Guerrero)\
**Post date:** [February 14, 2024, 1:06am UTC](https://community.glideapps.com/t/delete-multiple-rows-via-button/70801/6 "2024-02-14T01:06:42Z")

</div>

Ahh yes! The multiple relation was the issue. Thank you!

---

<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:** [February 21, 2024, 1:07am UTC](https://community.glideapps.com/t/delete-multiple-rows-via-button/70801/7 "2024-02-21T01:07:07Z")

</div>

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