I’m working on a restaurant ordering app and I’m encountering an issue with displaying items and their corresponding quantities in a Repeating Group.
I have a database with two fields of list types: “Cantidad” (Quantity) and “Items”. Both fields are populated from my checkout page to indicate the number of items a user has ordered.
The problem I’m facing is how to display each item along with its corresponding quantity in a single cell of a Repeating Group. For example, I want it to show “3 x Americano”, “2 x Flat white”, etc.
Here’s what I have:
“Cantidad” field: [3, 2]
“Items” field: [Americano, Flat white]
In the Repeating Group, I want to match each quantity with its respective item to display them together in one cell.
Any guidance on how to achieve this would be greatly appreciated!
Consider restructuring your data. Create an Order Item data type, with fields for Order, Item, and Quantity. Then, in your existing Order data type you need only a single list field for the Order’s Order Items.
Thank you very much for your response. I have made some changes to the data structure, but I still can’t visualize the items separately in a repeating group.
So far, I have three data types: Items, ItemCart, and Order. The data seems to be flowing well, as you will see in the two images I have attached.
However, I can’t manage to display the order with the information per item in a repeating group. That is, what I am trying to achieve is for a row in the table to say “Name: Americano,” “Quantity: 2,” “Subtotal: $2000.”
My mistake was that I wanted to show data from two different data types in the same table. So, I kept the table with the ‘Order’ data type and created an ‘Order Details’ button to view the Order’s Items cart data!
I recently started developing in Bubble and am still getting used to the logic behind it. Thank you again!