Is it possible to reset all true/false toggles in a collection?
I can do this in the database, and I can do it on a screen, but both require me to click on each toggle individually.
Does anyone have any ideas? Could I do it through some kind of screen reload?
Is there any “select all” function in Adalo? Click once to select all, click again to deselect all?
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.
Oh I understand what you mean now, I’ll have a fiddle in a test project and see if I can help. I haven’t used the actual toggle component much at all.
Thanks for your help Briggsy. The shopping list is a simple checklist, just like that found in many apps.
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.
Thanks again for any help you can give!
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.
Have you tried using a clear checklist option or button with an action that simply resets the toggles?
Sorry,I haven’t clearly explained what we’re doing. The shopping list is a fixed list of items we always need. Think of it as a “wish list”.
When I say “clear all checks”, I just mean to reset all items to unchecked state. The items the user purchased will remain on the list.
A button with an action that simply resets the toggles is exactly what I’m looking for. There doesn’t seem to be such an action.
Unless you know of one?
yes you can toggle them off all at once using a countdown timer. here is how it behaves, note the small delay though until the list is cleared.
the set up:
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.