# Reset Multiple Rows At Once

**URL:** <https://community.glideapps.com/t/reset-multiple-rows-at-once/22211>\
**Category:** Project Showcase\
**Created:** [February 3, 2021, 10:40pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211 "2021-02-03T22:40:19Z")\
**Posts on this page:** 20\
**Page:** 1

<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 3, 2021, 10:40pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/1 "2021-02-03T22:40:19Z")

</div>

There have been several requests for people to find a way to clear a value in multiple rows. I was thinking about that and came up with a quick example of a way to handle that. Instead of trying to clear a value in an entire column, I realized we could just change one value on a parent column, load it as a single value in our sheet and then compare that parent value to a column that we set or unset for each row. It’s not about clearing an entire column, it’s about making a value in each row not equal to a value in a single parent row. Then you can use an IF/Then column to determine if the ID in the single value column equals the ID set in a column for each row. Using a relation you can bring all selected values back to the parent. Easier to show than explain, so here is a simple example.

> **[Multiple Row Reset Concept](https://synonymous-sheep-0795.glideapp.io/)**

> **Update:** @Darren_Murphy has graciously recreated this basic concept as a template that can now be copied. Follow this link see his thread.
> 
> [Reset Multiple Rows - copyable template](https://community.glideapps.com/t/reset-multiple-rows-copyable-template/78907)

This probably won’t work in certain cases, like Add/Edit/Form mode, but if you build it on a detail screen it works great.

BONUS: If you create a Math column, fill it with today’s date, and format it to show date only, then you could create a template column that takes that math column and “locks in” the date formatting. That template column could replace the ParentID column and instead of saving an ID into each task row, you would save the date into each task. This way you could have tasks that would automatically reset at midnight.

* * *

**Edit:** Here is a more advanced version that allows for an option to Select/Deselect All tasks at once. This version feels overly complicated for what it is, but it works. I also added an option to add new tasks, and if ‘Select All’ is selected, the new task will be added as unselected and the ‘Select All’ checkbox will become unchecked. I did discover a bug when adding a new task, where it appears to activate the action on the list item and it was setting the ParentID on the new task, even though my Add Row action wasn’t setting that column value at all. I can only assume that the list action gets triggered. To get around it, I added a Set Column action to clear the ParentID column after the row is added. Feel free to play with it. All Tasks are shared among all users, but task selections are unique to each user.

> **[Advanced Multiple Row Reset Concept](https://billowy-head-4837.glideapp.io/)**

* * *

**Edit 2:** @Roldy took this a step further and added the ability to save your selections as a preset and later reload any of those saved presets. Here is the link to his post and sample app.

> [@Choice component MULTI-SELECT: now a dream, soon a reality?](https://community.glideapps.com/t/choice-component-multi-select-now-a-dream-soon-a-reality/16204/18):
>
> @Jeff_Hager I have experienced with your examples and I understand your technique well. Then I asked myself: why not also offer the possibility to save and load a selection preset? thinking Basically it was just what I needed in most of my scenarios. Thanks for inspiring me! smiley Please Try my version and let me know.

> **[Multiselection and Preset](https://multiselandpreset.glideapp.io/)**
>
> Example of multi-selection with the possibility of saving the set and reloading it later.

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [February 3, 2021, 11:27pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/2 "2021-02-03T23:27:53Z")

</div>

Great job! I used a very similar approach to “approve” multiple rows at once (i.e. change a boolean to true on multiple rows at once). I decided to abandon it though because I could only get it to work if everything was approved in order — I had the “last” single value determine the values above it. It works great, but if there were ever a row that needed to not be approved, I couldn’t find a reliable way to make it work properly and be dynamic enough to work in all possible workflows for the users.

---

<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 4, 2021, 12:09am UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/3 "2021-02-04T00:09:57Z")

</div>

Hmm, so basically a Select All / De-select All with the ability to override individual items? I might have to play around with that idea. I wonder if it would work with setting ID’s instead of booleans. Would probably require setting timestamps as well and checking if the timestamp of a ‘select all’ or the timestamp of and individual item should take precedence. Might get overly complicated, but I might have to give it a shot. Maybe it wouldn’t be too bad.

---

<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 4, 2021, 12:13am UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/4 "2021-02-04T00:13:57Z")

</div>

Yes! This is an excellent alternative to the time stamp solution I showcase here:

> [@repeat\_button How to set up a recurring daily checklist](https://community.glideapps.com/t/how-to-set-up-a-recurring-daily-checklist/21430):
>
> Enjoy! [[Glide: Setting up a daily RECURRING task list] ](https://www.youtube.com/watch?v=de2BUPsQCAc)

Or really here:

> [@white\_check\_mark Flashcard: Create and Study Custom Flashcards](https://community.glideapps.com/t/flashcard-create-and-study-custom-flashcards/16531/7):
>
> :partying\_face:Version 2 in the works!

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [February 4, 2021, 12:36am UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/5 "2021-02-04T00:36:28Z")

</div>

I spent a while on it and thought I was getting somewhere by checking the last entry and the 2nd last entry… But then what if the 3rd last entry wasn’t true too… It gave me a headache haha

Basically, a user submits a row for approval. They may submit multiple rows before the previous ones are approved. Manager goes in and see all the unapproved items. They’re given the option to approve each one individually (checkbox inline list) or press an “approve all” button if they’re all ready to be approved.

The logic I created was working until someone approved something out of order, or if a previous submission should not be approved. Setting the “last” entry to approved should not affect the unapproved row in that case, but should affect the other unapproved rows. The timestamp idea brings in some new options in my head though.

---

<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 4, 2021, 1:09am UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/6 "2021-02-04T01:09:41Z")

</div>

@Robert_Petitto Timestamp is a good solution too. Maybe you actually planted the seed in my head. 😉 I think I initially considered timestamps to begin with, but for whatever reason I settled on a unique id instead.

@kyleheney I think I understand what you are saying. I’ll see what I can build into my concept app. May be a couple days. We’ll see.

---

<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 4, 2021, 7:40pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/8 "2021-02-04T19:40:10Z")

</div>

@kyleheney I think I figured it out. Although it’s quite ugly to implement.

> [@Jeff\_Hager](#):
>
> **Edit:** Here is a more advanced version that allows for an option to Select/Deselect All tasks at once. This version feels overly complicated for what it is, but it works. I also added an option to add new tasks, and if ‘Select All’ is selected, the new task will be added as unselected and the ‘Select All’ checkbox will become unchecked. I did discover a bug when adding a new task, where it appears to activate the action on the list item and it was setting the ParentID on the new task, even though my Add Row action wasn’t setting that column value at all. I can only assume that the list action gets triggered. To get around it, I added a Set Column action to clear the ParentID column after the row is added. Feel free to play with it. All Tasks are shared among all users, but task selections are unique to each user.
> 
> [billowy-head-4837.glideapp.io](https://billowy-head-4837.glideapp.io/)
> 
> ### [Advanced Multiple Row Reset Concept](https://billowy-head-4837.glideapp.io/)

---

<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 4, 2021, 7:50pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/9 "2021-02-04T19:50:00Z")

</div>

Oooo…the “select all” is a nice touch.

---

<div class="post-metadata">

**Author:** ![kyleheney](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/kyleheney/32/41173_2.png) [@kyleheney](https://community.glideapps.com/u/kyleheney)\
**Post date:** [February 4, 2021, 9:28pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/10 "2021-02-04T21:28:26Z")

</div>

Ooo this looks promising! I’ll have to dig deeper into tomorrow when I’ve got some time. Thanks for looking into this!

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [February 4, 2021, 9:36pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/11 "2021-02-04T21:36:06Z")

</div>

That’s really really good, Jeff! Thanks for sharing

---

<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 4, 2021, 11:14pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/12 "2021-02-04T23:14:43Z")

</div>

I will say that it’s still glitchy and there is definitely a glide bug somewhere. I noticed that when other users add a task to the list, it is firing the list’s action for everybody else and marks the task as selected for everybody else. That’s the part I thought I fixed by clearing the ParentID through a Set Column action after the row was added. Apparently the “fix” (workaround) only applies for the same user adding the row. The only time ParentID should get set is when you tap on a list item, but somehow it still happens when a new list item is added and it appears on other user devices.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [February 5, 2021, 3:29am UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/13 "2021-02-05T03:29:11Z")

</div>

Hola @Jeff_Hager,

I have been one of those that have tried to find a solution and an explanation for months. @Robert_Petitto carried out a similar solution weeks ago and both are fine!

But the problem source keeps intact: why can’t any Set Column action work with a multiple relation? 🙃

Using SQL terms, we just need a **SQL UPDATE Statement** to get it

```
UPDATE table_name
SET column1 = value1, column2 = value2, column3 = value3 ...
WHERE condition

```

The _table\_name_ and _condition_ are part of a Glide’s relation and _columns_ and _values_ are parameters of any Set Column action, everything is here.

If we can get it, we can update any inventory easily as well after a sale operation when any APP uses the Joint List column to create its List Items associated to an order.

Saludos, feliz noche!

.

---

<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:** [February 5, 2021, 6:31am UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/14 "2021-02-05T06:31:21Z")

</div>

> [@gvalero](#):
>
> But the problem source keeps intact: why can’t any Set Column action work with a multiple relation? 🙃

Because that hasn’t been released as a feature (yet) 😉

But yeah, lots of us have been asking for this, and it certainly makes sense. So hopefully it’s somewhere in the Glide backlog (and not buried too deeply) 🙂

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [February 5, 2021, 4:47pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/15 "2021-02-05T16:47:36Z")

</div>

Working very well 🤩

https://www.loom.com/embed/5648ca4b706949bebd6720713a321c92

Link [Easy Doctor · Glide · Create Apps from Google Sheets | Loom](https://www.loom.com/share/5648ca4b706949bebd6720713a321c92)

---

<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:** [February 5, 2021, 4:52pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/16 "2021-02-05T16:52:04Z")

</div>

haha… your apps always look so slick! 👍

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [February 5, 2021, 4:53pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/17 "2021-02-05T16:53:27Z")

</div>

haha… thank you @Darren_Murphy 👊😁

---

<div class="post-metadata">

**Author:** ![ehdubya](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ehdubya/32/24087_2.png) [@ehdubya](https://community.glideapps.com/u/ehdubya)\
**Post date:** [February 5, 2021, 4:55pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/18 "2021-02-05T16:55:40Z")

</div>

Ditto! I wish I knew a tenth as much CSS haha

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [February 5, 2021, 4:57pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/19 "2021-02-05T16:57:38Z")

</div>

Btw, I’m just using CSS to get this gradient effect, because I feel it was too much white space lol

So, basically, only here 😜

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/f/1f8622d5abc664d1ee9cdddcb16fe4b487eba9d2.png)

---

<div class="post-metadata">

**Author:** ![ehdubya](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ehdubya/32/24087_2.png) [@ehdubya](https://community.glideapps.com/u/ehdubya)\
**Post date:** [February 5, 2021, 4:58pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/20 "2021-02-05T16:58:33Z")

</div>

That’s the part (or one of) we’re talking about! SO cool!

---

<div class="post-metadata">

**Author:** ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)\
**Post date:** [February 5, 2021, 4:59pm UTC](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211/21 "2021-02-05T16:59:38Z")

</div>

Yeah! Thank you! Gives all the charm 😌

[Next page](https://community.glideapps.com/t/reset-multiple-rows-at-once/22211.md?page=2)
