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