Unable to show complex data into repeating group

Hello Everyone,

I am struggling badly with structuring my database and viewing them:

I am working on a Menu Orders that allows me to do multiple categories and subcategories and viewing them by clicking into each categories and subcategory to select the menu item.

I have created:

#1 separate Option Sets for:
i) Coffee, Smoothies, Lemonades
ii) Sweet Pancakes, Fluffy Pancakes,
iii) Beef Burgers, Chicken Burgers
each Option Sets have fields of name (text) and price (number), these are the menu items I want to reach to select, for example Coffee entries I can have:
name: Black Coffee; price: 4
name: Black Coffee REFILL; price: 0

#2 separate Option Sets for Drinks & Shakes; Pancakes, Burgers
each Option Sets have fields of List of their Option Sets from #1, for example:
i) Drinks & Shakes, field of List of Coffee, List of Smoothies, List of Lemonades
ii) Pancakes, field of List of Sweet Pancakes, List of Fluffy Pancakes
iii) Burgers, field of List of Beef Burgers, List of Chicken Burgers
the way I am thinking is each category in this layer I can have multiple Orders, such as I can pick Drinks & Shakes and pick a Black Coffee, and pick Burgers and pick a Beef Burger; or Drinks & Shakes and pick Black Coffee and Lemonade, and nothing with Pancakes and Burgers just the Drinks for this Order

#3 lastly a Data Type Orders with fields of each List from #2
i) field of List of Drinks & Shakes
ii) field of List of Pancakes
iii) field of List of Burgers
the way I am thinking is each Order is a new Order separated from other Orders

when I try to use Repeating Group to show the data by selecting Type of Content is Orders, and Data Source search for Orders; a text field to for example picking Current Order’s cell Drinks & Shakes Display and nothing shows

am I doing it very wrong or too messy or something is just not right?

is it the way I structure the database? but I may have more complex options in the Menu, such as Pancakes, I may want to add a new Option Sets to choose a List of Add Ons such as Adding a new Egg, or adding new Sausages; and for Egg, I may need another Option Set to choose a List of How the Egg is done such as scramble, sunny side up, egg whites only etc

Please if anyone can advice me the right direction, thank you!!!

Category
Title (text)

Subcategory
Title (text)
Category (category)

Dish
Title (text)
Price (number)
Category (category)
Subcategory (subcategory)

Order
Title (text)
Date (date)
Order items (list of order items)

Order item
Dish (dish)
Quantity (number)

thank you Sir, let me try understand and illustrate each step:

Category
Title (text)
example:
Menu
Drinks & Shakes
Pancakes
Burgers
explanation: if is a text field, this make me able to select right? like a button clicking into the subcategory

Subcategory
Title (text)
Category (category)
example 1:
Coffee
Drinks & Shakes
example 2:
Smoothies
Drinks & Shakes
example 3:
Sweet Pancakes
Pancakes
explanation: same thing the text works like a button for me to click into the next subcategory/dish right? and category is a relation to this category (doesnt have to be a list?)

Dish
Title (text)
Price (number)
Category (category)
Subcategory (subcategory)
example 1:
Black Coffee
4
Drinks & Shakes
Coffee
example 2:
Black Coffee REFILL
0
Drinks & Shakes
Coffee
example 3:
Classic Pancake
15
Pancakes
Sweet Pancakes
explanation: this will be the bottom I want to get into to select a dish, just wondering what if I want to further extend if a particular dish have an option to upgrade, such as the classic pancakes, I have option to add Eggs for extra cost, and for Eggs can choose the way it cooks such as scramble, egg whites only, boiled, poached etc?
another example if I have a scenario of Steaks, I can pick two sides, how the beef is cooked (rare, medium rare), the sauce, and possibly extra cost for another extra sides, how should I work on such scenario?

Order
Title (text)
Date (date)
Order items (list of order items)
example:
Order 1
May 10, 12:03pm
Classic Pancake $15
Black Coffee $4
Black Coffee REFILL $0
explanation: I think I get this part, this will be the Order to store each new orders, and the Order Items is a List allows me to have multiple Orders right? May I ask how to configure this part, 1) Should I add another number field as Balance to store the total of each orders? 2) lets say instead of calling it Order, we make it as Table; Table 1 takes Order Items for Lunch Hour, and able to flip 3 tables during Lunch Hour, is there a way to store 3 records of Table 1 into a Sales Record for future analysis? 3) Further extending if I want to apply discount and Membership, do I just make a new number field and Member field to work with Members?

Order item
Dish (dish)
Quantity (number)
explanation: I think I understand this part, it will be a List of Order Items for Orders, and able to selection Dish from my Menu, and the Quantity of how many Orders

Thank you Sir, this kind of simplified the database so much more, may I ask how do I should it on Repeating Group? I think I should have 4 pages right:
page 1: Order
page 2: Category
page 3: Sub Category
page 4: Dish
the Repeating Group taking the Type Of Content and Data Source of their own category right, then for Sub Category I might need more pages for each Sub Category? such as a Page for Pancakes, a Page for Drinks & Shakes etc?

thank you for your guidance!

1 Like

thank you Carlos, I got it to work in some way, below are some screenshots:

I followed your advice to structure the Dishes by assigning Category and SubCategory, but as you can see in the last screenshot, they all show up even I only clicked on Coffee, is there a way to filter them?

Thanks Carlos

1 Like

thank you Carlos!!! you are my saviour!!

Sorry I kept asking you questions, I was thinking about the Data Type Dish, remember in the above I asked you about scenarios when the Dish might have multiple additional options to choose from such as selecting sides, choose the sauce etc; I thought of a solution by creating multiple Dish Data Type, such as:

Dish0
name (text)
price (number)
Category (category)
Subcategory (subcategory)

Dish1
name (text)
price (number)
Category (category)
Subcategory (subcategory)
Sides (List of Sides)

Dish2
name (text)
price (number)
Category (category)
Subcategory (subcategory)
How Beef Cooked (List of How Beef Cooked)

So in this way, I can assign different type of Dishes according the Dish Data Type for my complex selection, but then I start to see a problem, for Order Item, I can only take one Dish as the data, then how am I able to cover all Dish0, Dish1, Dish2, DishN for Order Items?

Thank you Carlos!

@jcwork712

thank you Carlos,

Been playing with it for a while, I made some changes to Order Items to:

Order Item
Dish (Dish)
Quantity (number)
Sub Items (List of Sub Items)

So I can put all my Sub Items into a new Option Set holding all the add ons I need such as Sides Broccoli, Egg Scramble, Sauce Chili Pepper etc, and each add ons I assign a Type so I can set constraint for viewing the right Sub Items for Specific Dish, please check the screenshot below:

Probably I haven’t setup my Order Item and Order correctly yet, I have made a new Group and RG on my right side layout act as taking Order Items, but when I pick the Dish (Lumberjack Slam), and picking Egg White for my Sub Item, it created two new entries, is there a way to Select the specific Order Item, and only assign the Sub Item to that specific Order Item?
I guess this will also solve the problem of assigning the Quantity for the Order Item right, by able to select the Order Item, and also an “X” for cancelling this Order Item.

Thank you Carlos!

I recommend you change the subitems to be a data type.

You can manage options sets from the editor (crud … create, read, update, delete)

But your users are not going to have access to your editor (too risky as you will be exposing the entire backend of your app … dB, flows, UI). You will likely build an admin page to handle CRUD of your subitems. They can change in the future and you will likely need to manage them :grinning:

thank you Carlos,

Sorry I meant Data Type for Sub Items, and Option Set for Sub Item Type:

and as for my Ordering Layout on the Right:

I am able to add the “X” to delete the App data entry, and set the Quantity default as “1” for one order and able to tap and change quantity if needed. However I still cant figure out how to add/append the Sub Items into the same entry of the Dish if I created one

This allows me to add Sub Items but as a new entry, I wondering would it be grouping issue? I need to group everything together in this Order Item? I haven’t done any grouping yet, I find it very messy to understand :sweat_smile:

Thank you Carlos!