Scheduling app data relations

I am building a Calendar Shift Scheduling/Confirmation app for my transportation company. I’ve got the process down for creating events, creating routes with shift times, and creating users. What I need help with is the data relations, or rather to make sure I am going about it the best way.

When a dispatcher/supervisor opens the app they can see the main calendar displaying all shifts that have a driver scheduled. When they click on the day it opens the pop up, for that day, allowing the to select the route, which automatically fills in time information, and then can select a driver for that route, for that day, and when they click the save button, it creates the calendar event, and then associates the shift with the selected driver.

Im thinking that I need to create a data table, named assignments, that contains two columns 1)List of Calendar Events, and 2)List of Users, then on the user data table, have a column that contains a list of assignments, and on the events data table, a column that contains the driver(user), so everything can correlate and connect.

The goal is to have it so when a driver opens the app, they can see the shifts they have been scheduled for, and then select the shift, and click a button to confirm they are aware of the shift they have been scheduled for.

Thanks

You have a data type for route which has time information as fields

You have a data type for drivers with fields for personal info related to the driver

You have a data type for calendar event which has fields such as date plus related field for route, so that you know which route for what date plus related field for driver

You could then on the driver have a field which is related to calendar events, so that a user can see a list of calendar events ( dates and routes ) they have been scheduled for

There’s actually a few ways to do this. I have an appointment based app and I’ve done it two ways.

My database in a nutshell is Company - Users - Pets - Appointments.
A user can be a client or an employee or both.

Users has a List of Pets as a Field type.
Pets has list of Appointments as a Field type
Company has a list of appointments as a Field type.

Appointments are assigned to users (employees)

There are two “main pages” for Employees, a dashboard that shows all appointments or their home screen that only shows appointments assigned to them. There’s a calendar that looks at Appointments for the data type, and it looks at CurrentUsers>Appointments as the data source.

So in your instance, If I understand it correctly your database is setup as Events - Routes - Users. So the easiest way is to reference those inside the user. Whenever you assign a route to a user it will add it to the list of routes they already have (or remove if need be) in their user.
You could have a repeating group or however you want to display it, when they get to their page, the data type would be Events, and the data reference would be CurrentUsers>Event’s.

The way mine is set up this was is to eliminate the need to Do a Search on databases. In my mind, just displaying a list without having to search through a database with constraints is much quicker and seems to be.

Let me know if this helps, or if you need screen shots as initially this is very confusing, but makes much more sense once it’s up and running.

I think it is much quicker as well…also easier in development as well when doing dynamic expressions.

I also use filter to get the right item in the list by referencing a URL parameter…which also really helps when trying to get reusable elements on the page to be linked up as you can create the same dynamic expression in the reusable element referencing a URL parameter as on the page and no matter what page that reusable element is on, if the same URL parameter is present it will get the right list item.

@bcart0v, so my app is essentially similar in concept to yours. I see the vision in mind, but can seem to translate out into bubble.

To reference your setup the Dispatcher is the Client/Employee(Supervisor), the Routes are the Pets, and the Drivers are the Employees. The Dispatcher can see all appointments(routes assigned), can set which pet(route) goes to which employee(driver) on which day.

The driver page or home page will only shows on a calendar which route they have been assigned, they are not able to see other routes(appointments) and who they are assigned too.

Where I am struggling to put my thought into bubble is linking it all together in the workflows.

I understand how to create a thing, and attach it to a user, but that is with the currently logged in user. So when the dispatcher is looking at the calendar, they can click on a day, it opens a pop-up showing a drop down list of routes(pets), and drop down list of drivers(employees). When the dispatcher clicks the assign button, it creates and makes a record for the actual appointment on the calendar for that day, and then associates it to the driver(employee), so they can see what route(pet) they have been assigned(appointment) for that day.

How did your go about your workflows for the appointments setting, and reference to specific employees, so when the employee logs in, they see what they have been assigned.

Thanks

Sorry, was traveling for the holidays but I’m finally settled in.

So how mine is set up, there is a main screen that a superviser uses that sees all employees and schedules. I actually use Air Calendar because it has quite a few views with “Resources”, so in my database the employee is the resource, so it looks like this;

So when an appointment is made, they see the same calendar (or have a drop down) of a list of Groomers and Bathers (all employees). So when the appointment is saved, that Employee is saved into the appointment.

When a Groomer logs in, they are taken to their dashboard which has the same exact calendar, only the resource is just Current user, so it’s scanning the GroomingAppointments but only displaying the appointments where the groomer=current user. That way they only see things assigned to them.

Now to make it more complicated lol. The way my database is setup, my thought process was that there will (probably) never be more than 25-50, maybe 100 appointments in the future, but the past will always continue to pile up. So, in my CompanyMaster data file I added list o f GroomingAppointment’s as a field type. So when an employee create’s an appointment 2 things happen.

  1. a new GroomingAppointment is created after the user hits save.
  2. A backend workflow is fired off that adds that grooming appointment to the list of GroomingAppointments in CompanyMaster.

The reason for this is to eliminate the need to Do a Search whenever anyone is looking at future appointments, as it’s faster to just display a list that already exists in the data table.

This is what it looks like when displaying it on the superviser calendar;

The type of events is GroomingFuture, and the source is the Current Users > Company’s > Grooming Futures.

When an employee logs in and looks at their calendar it looks like this;

Same exact expression except Filtered: AssignedGroomer=Current user is added, so they only see the appointments assigned to them.

This logic would translate over to Repeating Groups displaying this information, it would be the exact same method.

Hope this helps!

@bcart0v, no worries safe travels, and happy holidays.

Thanks for that, I will give air calendar a try, see if I can get it to function for my needs.