Does anyone know how to fix the delete action bug. I think it’s a bug, maybe it can’t be. Anyway, I will explain the problem that is happening, I created an order menu database and in that menu, when the user clicks on an icon, this menu is created for two databases, an order database and another order item database, when these two databases are created based on the menu database, the part of the order item database is shown in a list, where only the order name and the price and below it has all the pricing of the product this pricing is from the database ‘’ orders ‘’, and the problem I’m facing is, when the user wants the option to cancel the order, there would be a button below where there are two actions delete , this delete action would delete the database created ‘’ orders ‘’ and the database ‘’ order items ‘’ but in practice it does not work, because when the user clicks, the databases still exist. I don’t know what’s going on. Does anyone have any idea what it might be?
Delete records that are not in current list, you need to create interim screen which open the collection’s records you want to delete.
For example, if your current list is order collection and have delete action, it will only delete on that order collection, order item collection’s records are not deleted.
So, to delete order item’s records, create new screen and fill with custom list of order items collection and filter accordingly, and put countdown inside list which action is to delete current record.
Popular term is bulk delete, but I’d like to call it batch delete.
Hi Trov,
You’re doing A LOT of different things here, but I think there’s a fundamentally better way to do this. I made a video of this here - Adalo Tutorial - Setting up the Database and Collections in a Restaurant App - YouTube
In short - create the order before the user gets to the menu. When the user adds an item, create an order item and add that to the existing order. If a user exits from the order, you can just delete the top level order.
Periodically, you’ll want to clean the collections of order items without an order (and same thing for order variants).
I have the full tutorial on knodalo.com if you want to see the entire video.
Hope that helps!
Erik
Hi @Trov
As @Yongki mentioned - to delete the order + order items, you need to make a “bulk delete”.
Some time ago I’ve made a video about it, see here: Adalo hints: mass delete with sub-collections (countdown timer tricks, part 2) - YouTube
Best,
Victor