I know that this was brought up a few years ago, but I believe it’s worth a bump.
Currently, @Jeff_Hager’s solution is the best possible way to achieve a simple select all / clear all function for a list. It does not even use a checklist component, as you need to initiate an action through an item click.
I suggest that a dedicated column be required for checklist selection status, similar to the sort order status column for a Kanban. Assuming that giving users the ability to modify a whole column (e.g. to change all Boolean values de-selected to “False”) would be novel for Glide, but hoping that adding a dedicated selection status column would help solve that issue.
Just a comment on this. I just recently implemented a form of my basic method in an app where I needed to reset a status and a date on several rows at once. I didn’t have a need to mass select anything, but I needed to “clear” values in multiple rows instead. This was a little more complicated than just setting or clearing a boolean.
I ended up creating a custom AI component which mimics a chip style choice component. Through a little back and forth in the AI chat, I was able to get it to set the status in a status column, save the global unique ID at the same time (similar to my method), and clear the date only when the new ID is updated to match the global ID. This eliminated the need for any actions as the custom component can set multiple columns in the row at once. ‘Not Completed’ will be the default selection if the unique IDs don’t match, or the status column is empty. So even though the underlying status may still be set to In Progress, Completed or empty, it will still show Not Completed as selected until the user changes the status and the underlying unique ID is updated.
I couldn’t get a suitable date picker built into the custom component, so I still use the native date picker. The date picker only shows if the IDs match and the status is ‘Completed’, so even though it doesn’t clear right away and might still have an underlying date, it will clear when the status changes and the unique ID is updated.
It’s mostly cosmetic as the underlying values are not reset until something is changed in each row. But for my needs, it works perfectly.
Point being that my setup would have been a whole lot easier if we had the ability to Set Column values through a multiple relation, just like we can do with the delete action. I think this would easily solve the mass selection or deselection of checkboxes as well. Maybe once automations are released, it could make something like this easier for Glide to achieve, since automations prove that multiple rows can be updated at once. For something like this, Set Column over a multiple relation, or something similar, is desperately needed.
Awesome solution. I ended up doing the following re: making a checklist with “clear all” functionality:
Used a List component with each line being an item in the list
Created two images: an unchecked circle and a checked circle
Created two values per row: “New Selection Counter”, “Existing Selection Counter”
Created a button on the List to “Enter Selection Mode” or “Exist Selection Mode”, depending on which mode the user was in based using a column to track in the user profile row
When the user clicked Enter Selection Mode the unchecked images show up for each list row
When a user clicks on a row, or “check” it, an Action is triggered to increase the “New Selection Counter” by 1
An If Then Else column which provides the image to give to the List changes the image to the checked image when the “New Selection Counter” is greater than the “Existing Selection Counter”. So, when the user clicks the row, the image changes to checked
Used a multiple relation to be able to take actions with the selection; e.g., email their associated documents to myself
When the user finally selects “Exit Selection Mode”, the “Existing Selection Counter” increases by 1, thus making that value and the “New Selection Counter” equal, resetting the system
Absolutely not the ideal solution as if the user does not exit selection mode, it all breaks down. It’s also sad to be doing all of this when there is a checklist component already is available, but it is not ideal.
Also:
This is the key. It would solve many, many things and can greatly simplify the setup of a lot of my components.
mmm, not quite strictly true.
Automations do allow you to “loop” through multiple rows, but they are still processed one at a time. But yeah, you can target multiple rows through a relation/query, or even an entire table.
You can also do this with the ai component (other solution)
Quick Demonstration of Prompt optimization to have a consistant result with the AI custom component.
In this example, the AI component is used to reset at once a collection of mechanical parts Checkbox. On the left of the screen of the video a classic glide checkbox component and on the left the Ai component. No glide action is needed. The Ai component listens to the computed column Status and when the value of that column is reset then Checkbox is set to false.
Here is the prompt :
1/ Create a checkbox component no label binded to Selected with Name, Price and Photo next to the checkbox. Set the component background color opacity to 0 and add a thick border with accent color to the Photo when Selected is true. Photo should always be visible.
2/ When the value of Status changes and is equal to reset, the component should automatically respond to this change and update itself to set Selected value to false.
So if I’m understanding correctly, are you saying that when a certain value changes (such as a single value column in all rows), it triggers the custom component which in turn updates a boolean in multiple rows at once?
Yes totally and of course you can put any values like « all » for example to check all the boxes at once. I have a video but I don’t know how to add it here
That’s brilliant! Could probably create an almost invisible custom component in a custom collection to handle things like this. I will have to keep this method in mind. I think I saw your video somewhere (Slack?), but didn’t quite catch on to what was actually happening behind the scenes.
Yes my video is on the expert slack. I have to improve my English to make it more understandable
I though also of the invisible component (visible from glide perspective) and it works great, still have to work on the css to make it as small as possible