I have a faculty member that would like to have where students can choose a date and then pick from a list of available time slots for that date. Once chosen, it would mark this time slot as no longer available to others that go to submit the form. Is this possible?
Thank you for any assistance.
Question
Question
Is it possible to have a form with available dates and timeslots that update after being picked?
Answer
- Set up a table in your SQL database to store date-time slots. Each row represents a slot, and columns can include fields like SlotID, DateTime, and Status.
- The Status field can be initially set to “Open” for all slots.
-
Populate the table with the available date-time slots. You can do this manually or programmatically, depending on your requirements
-
Setup a view that filters only what is availalbe to select
-
Use a lookup rule that pulls in the dates and time availalbe into your form.
- When a form is submitted, trigger workflow to update the status for that selection to closed so it can't be choosen again.
- If you want multiple slots for the same date and time you can use a numberic status and count down to 0 as slots are taken.
I would also suggest building in a validator in workflow to verify the slot hasn't been removed from SQL. Since the selections don't refresh once a form is open, two people (or more) could make the same selection at the same time and then submit. If there is only one slot available, two people can request it and get double booked. If another form was submitted first, you can have the validator kick back an email asking the submitter to request another option. Then when they reopen the form, the dates and times will be updated from their view.