List Available Appointments

  • 1
  • Question
  • Updated 4 years ago
Our clinic calendar is built up of 30 minute appointments from 9 am to 6 pm. When an appointment is created, it is related to a clinical user on our org. 

Is there a way to list available appointment slots - that is, appointments that have not been scheduled?

It could act kind of like the inverse of an aggregate model on the scheduled appointments.

PS - Banzai rocks my socks
Photo of Griffin Brown

Griffin Brown

  • 2,818 Points 2k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Matt Sones

Matt Sones, Champion

  • 32,156 Points 20k badge 2x thumb

I won't way it's the best solution, but I've created a separate object for 'open appointments', which has all the fields that I need to capture on scheduling. Our scheduling calendar has two sources, the open appointments and the scheduled ones. Users can click on an open slot, fill out the details, and then when they click a 'schedule' button, we run some javascript to create a new row in the scheduled appointments model and delete the row in the open model. Depending on your complexity, you could probably do the whole operation in the action framework as well.

PS - socks also rocked