Case: an event listing with tickets

Linked tables, sessions in different halls, payment and a ticket with a QR code that opens from My tickets.

The event listing in preview: screens, tickets and my tickets.
The event listing in preview: screens, tickets and my tickets.
  1. Linked tables. Categories, Venues, Halls (each hall has its venue), Events (category is a relation) and Sessions: a session links to an event and a hall and has a start time and a price. One event can have any number of sessions in different halls, and a venue address is edited in one place.
  2. List. The home screen has a repeater over Events. The first filter is search: field title, value {{search}}. Above it sits Filter buttons with options from the Category column; the list is ticked under its What to filter, and the category filter is filled in for you.
  3. Event. The card remembers the tapped row as selectedEvent and opens the Event screen. Sessions there are a nested list, {{selectedEvent.sessions}}: a relation works backwards too. The venue is read through the hall, {{selectedEvent.sessions.0.hall.venue.name}}.
  4. Checkout. The chosen session is remembered as selectedSession, and the ticket count builds up in the ticketCart list. The pay button runs, in order: Submit a form (a request to the organiser with the event, session and hall), Take payment, Add a record to the Tickets table, and Go to the Ticket screen.
  5. Ticket. The Add a record action has Remember the record as set to selectedTicket. The Ticket screen opens exactly that record, and its QR code is the record’s id, unique to every ticket.
  6. My tickets. The Tickets table is set so that everyone writes for themselves, so the list on the My tickets screen shows a visitor only their own tickets, while the owner sees all of them in the Data panel.

Read next