Reset Multiple Rows At Once

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.

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

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.


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.

37 Likes
Reset Multiple Rows - copyable template
Update multiple row values via relation / action
Available for copy: Newest form choice, progress bars & joined texts concept
23 duplicate entries using "Add Row" action
Can we toggle boolean items using custom actions?
Multiple choice in form
Set columns - Clear value action doesn't work the same way everywhere
The Magic Inline List that thinks it's a Choice Component :scream:
Setting Column Across Multiple Rows
Joining columns without using the Template function?
Choice Component - multiple selections
How can users save public list items to user-specific lists?
Clearing Data in "Note" and "Adjustment" Columns After Button Click
Looking for ideas - how to solve 'create new card' button in a Swipe app
Updating mutiple rows column value through button
Set a numeric value across multiple rows
Button Action re-triggered when tab becomes visible
Select all option in Checkboxes
Multiple selection
How to create science lab inventory
Use "set column" to clear all values in a column?
Bar code reader
Create a Leaderboard from User-Specific Data
Feature to clear user specific column data
Let each user mark his favourite items from menu
Choice component MULTI-SELECT: now a dream, soon a reality?
Add a Date Stamp when item is edited or submitted
Tutorial: Arrayformula in Google Sheets, good practices & how to overcome Arrayformula restrictions with scripts
Insert Multiple Rows Per Day
Create an email list of event attendees for group email
Glide API (sometimes) doesn't update rows
Auto toggle off with Google Script?
What Actions do you wish Glide had?
How to set multiple choice and user display setting?
Clear all values in a user specific column
An EASIER and LEANER Trebuchet Method for Multiselect
Multi select for form
Reset Boolean field for all records
Google SEO and Glideapps
Help with an App Idea
Any way to iterate over all rows?
Help with dropdown for Q&A
A new method for Choice Component multi select?
🔁 How to set up a recurring daily checklist
Remises à zéro check
🚀 Set Column Action: Alter a DIFFERENT SHEET'S VALUES!
Delete all rows in a table?
Pulling guest/customer data once instead of duplicating?
Multiple selections - Attendance record - a selection of students in one entry
:arrows_counterclockwise: Bulk clear, edit, restore and delete columns plus Undo action
How to Basic Multi-Select Filter?
Shopping Cart Concept for demonstration purposes
Add a delete List button
Action to add a row with more than just the first item in a list?
Clearing user-specific checkboxes using actions
✅ Flashcard: Create and Study Custom Flashcards
How to bulk reset checkboxes across multiple rows in Glide?
How do you clear an entire column?
Add actions to checkbox
Clear Multiple Rows / Columns
Automatic Toggle Trigger 💡
Game Design - Click and Loot
Reset button from another table
How to reset user-specific columns in glide apps
Resetting User Specific Columns
How to clear whole column?
Button in Google Sheet to 'Clear/reset'
Collection with custom filters + item selection by users
Who can explain what the unique identifier is exactly?
Can I reset multiple rows with the Explorer plan?
Habit Tracker - clear values for new record/day
Clear Whole Column PLEASE‼️
Creating a Consolidated Order Form for Items Linked to a Specific Supplier/Category
How to "clear an entire column" (compound action trickery)
Many-to-Many Relationships
Clear entire column
Change column values at once
Randomly Selecting a table row
Button to uncheck whole checklist
How to make an action edit the item of a column
🐟🥖🧺 Transpose Columns to an Inline List: The Miracle Method
How to reset all items status to back to "Available"?
Button to empty a column
Using Integrations for actions
Clear All / Select All for Checklist Components
Update data in related table via the user table
Uncheck boolean
Clear all checklist
AI Component to Clear All / Select All in Checklist collection
Target Multiple Rows
Can't make personal checklists for users
Status Update to Bulk Rows
Need help with a filter problem
Inline list background color change when "finish" button clicked
How to Reset Multiple Rows Without Using Updates or Triggers?
(select all) or (cancel all)
Clear value
My app hit 1K users & 15K+ rows in a week, help with performance degradation
Looking for help filtering checklist
How to apply the same update on several records form a form
Set all values in a column (at the push of a button)?
Set user columns
Reset the values...?
Form + Checklist
Clear all values in a user specific column

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.

2 Likes

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.

1 Like

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

Or really here:

3 Likes

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.

2 Likes

@Robert_Petitto Timestamp is a good solution too. Maybe you actually planted the seed in my head. :wink: 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.

3 Likes

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

4 Likes

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

1 Like

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

1 Like

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

1 Like

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.

2 Likes

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? :upside_down_face:

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!

.

6 Likes

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

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) :slightly_smiling_face:

1 Like

Working very well :star_struck:

Link Easy Doctor · Glide · Create Apps from Google Sheets | Loom

9 Likes

haha… your apps always look so slick! :+1:

3 Likes

haha… thank you @Darren_Murphy :facepunch: :grin:

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

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 :stuck_out_tongue_winking_eye:

image

4 Likes

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

1 Like

Yeah! Thank you! Gives all the charm :relaxed: