Disable ordering if the total number of all orders has reached the max for the day

Designing a menu ordering app. However, my customer wants to limit how many orders they can take in a given date. Would I start with the calendar so that the customer picks the date and in that collection it is connected to orders and if the count of all orders would be higher for this date no menu items would show and a different message would something like “sorry we are not accepting any more orders for this date”. Ideally, it should be based around the day of the week too. Meaning, if the restaurant is closed the max orders that can be posted for that date would be 0.

Thank you for any advice!!!

Hi @blove,

Welcome to the forum!

As for me, you’ve described the flow quite correctly. You can have an “Orders” table, with “Date” property for each order. Then, on the “Order” screen, you either

  • show “Make an order” button, which is conditionally visible: if Orders → Count, filtered by user-selected-date, is less then order limit.
  • make a “sorry no orders accepted” tag, which is conditionally visible: if Orders → Count, filtered by user-selected-date, is equal then or greater then order limit.

Did you try to create anything already?

Best,
Victor.

Thank you Victor. That makes sense. I will give that a try.
Have a great day!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.