Make the collection available on a screen via a list or place all your toggles in the User collection, then add an action on the screen itself, that way, everytime a user visits it, all the toggles are reset.
I do have the collection available on a screen. It’s essentially a shopping list.
If I set the toggles to update the true/false property in the database, the update persists even if the user leaves the screen and then returns. That’s ok for me.
If I don’t let the toggle do anything, the checks will only stay on the user’s screen as light as the screen is open. If the user leaves the screen, the toggles clear.
What I need is something in between. I need the toggles to stay “on” even if the user closes the app and returns to it later. But I want a way to let the user clear all the toggles once he/she is finally finished using the list.
That’s why I need a “select all” function, like you see on many websites.
My users will use it when they buy groceries, which they will donate to our free food pantry. As they shop, they can check off items. I don’t actually need their checks to be permanent, so I left the “what does this toggle?” setting blank:
Under these settings, the check doesn’t actually update the database. It “doesn’t do anything” except be visible to the user for the duration of their shopping session. Once the user leaves the screen, all checkmarks clear.
But I plan to change that setting, because I expect some of my users may not finish their shopping in one session. They may visit more than one store to get all the things we need. So I need the checks to persist until the user is ready to reset the whole list.
This is why I’m looking for a single button to clear all checks. I’m sure the average user won’t be willing to manually clear each checked item one by one. I just want a “select all/deselect all” type of function.
The true secret to any good app is that it must be super easy to use. Single click functionality is the gold standard.
I hope I understand this correctly; why don’t you create a dataset for “order items” and relate it to the shopping session? this way the checkbox toggles this session includes this order item and so, every user will have a choice from the homepage; start a new session or continue if they have an ongoing one. Therefore they see a clear list when they start a new shopping session but will see their selected items if they have an ongoing session.
Yeah having the user create multiple lists where they can just delete it when it’s done is probably a good way to go. Otherwise I think you’d have to create a custom toggle with two seperate icons showing and hiding them, then having a button to trigger a clear and setting a timer to reset the button (I believe that’s the only way)
When you say “clear all checks” do you mean, delete the list item or keep the list item but set it to an unchecked state? Because those are two completely different solutions.