I’m building a takeaway app in Glide, and I need some help with the workflow for my Submit Order form.
Here’s what I’m trying to do:
When a user places an order, I want to:
Add a row in the `Customer Orders` table
Set a default status (“Received”)
Delete all rows from the `Cart` table related to the user’s `Cart Group ID`
Show a confirmation notification
It adds the new row and sets the status correctly, but the **Delete Rows** action doesn’t work when I use the **Relation to Cart Group**. However, if I use **Relation to User**, it works – but that deletes all cart items linked to the user, regardless of witch Cart Group they belong to.
I’m using a relation column from `Customer Orders` to `Cart`, based on a unique template of `Cart Group ID + Email`.
Any idea what I might be doing wrong? Should I be using a different relation format or workaround?
To clarify: users can only have one active cart group at a time, and I’m using a unique Cart Group ID + Email to link orders to cart items. I did try using a Relation to User, and while it works, it ends up deleting all cart items from that user, even from past or future cart groups — which I want to avoid.
For now, I think I’ll continue using lookups to copy item names and totals into the Customer Orders table before deleting the cart, but your idea with comma-delimited Row IDs is super helpful and I’ll keep it in mind for more advanced setups.
Thank you so much for sharing this solution — it helped me better understand the logic behind handling multiple products and active orders in Glide. I was stuck trying to delete cart rows after submitting an order, but your explanation about using a Current Order ID in the Users table and assigning it dynamically saved me from a big headache!
I’ve decided to rebuild my workflow following your approach. Can wait to see that workflow working!!