Setting up data structure and admin acces

Hello!
I am having a hard time setting up my apps data structure and having it displayed for an admin. I do not have much of a background in developing so any help is much appreciated!

Scenario:
Imagine a self-serve tablet in a restaurant. Each table has their own tablet and is able to send their orders to the kitchen. The kitchen must have access to all of the tablets orders and be able to clear them once complete.

How would you organize the data so the kitchen can see all the tablets orders simultaneously, but also have the tablets ordered cleared from the tablet once the order is placed in preparation for the next order?

Thanks in advance!

Hi there, @jakob.larsen19… your app sounds pretty cool, and I think if I was visiting a restaurant that had your tablet system, I would really like it, especially if the system would be able to provide some feedback as to where my order is in the process (sent to the kitchen, picked up by the chefs, final prep, on its way).

As I’m sure you can imagine, there are lots of ways you could set up your data structure for such an app, but what comes to my mind after thinking about if for a bit is that your tables and the kitchen are the users in your system, and your User data type has a yes/no field called admin. All of the table “users” have this field set to no, and the kitchen “user” has it set to yes.

I’m sure you are going to have an Orders data type, too, and this data type could have a status field (if you wanted to enable the feedback concept I mentioned above), and it would definitely have something like a yes/no field called active.

When an order is submitted, a record is created in the Orders table (its Created by field is automatically set to the table’s “user” that submitted the order), and its active field is set to yes. Then, you have a page with a repeating group that is showing active orders, and the orders that are displayed in the group is determined by Current user and the admin field in the User data type. With this set up in place, the tablet at the table is displaying only the active order it recently sent to the kitchen, and the tablet in the kitchen is displaying all active orders (which could be done in a few ways by keying off of the admin field being set to yes for the kitchen “user”). Finally, when an order is complete, a button could be clicked to change the active field on the order to no, and poof, the order disappears for both the associated table and the kitchen because the repeating group is only showing orders where the active field is set to yes.

Anyway, that’s probably more than you wanted in a response, but it’s how I might approach your data structure, and I hope it helps (even if it’s just food for thought).

Best…
Mike

1 Like

Awesome thanks Mike! Super clear, I appreciate the detail! Let me go give this a try and see how it goes :slight_smile:

1 Like