I am currently in the process of developing an application intended for booking appointments for a mobile car wash facility. I would like the application to incorporate the following alerts:
- Users should be made aware of any scheduling conflicts if multiple reservations are attempted for the same time and hour.
- Appointments must be scheduled with a minimum interval of 50 minutes between consecutive bookings.
Your assistance and guidance in implementing these features would be greatly appreciated.
- You can create a virtual column with the type ‘Show’ to contain your warning regarding multiple reservations. It might read something like
- "Warning: “& COUNT(SELECT(Reservations Table[Reservations ID],AND([Date]=[_thisRow].[Date],HOUR([Time])=HOUR([_thisRow].[Time])))))&” reservations have already been made for “&[Date]& " during the “&HOUR([_thisRow].[Time])&” hour.”
You can then set the virtual column to show_if [_this]>0
- In this case, you can use a vaild_if expression in the [Time] column to determine if the [Time] entered has any of the following conditions:
- [_this]-000:50:00>=MAX(SELECT(Reservations Table[Time],AND([Date]=[_thisRow].[Date],HOUR([Time])=HOUR([_thisRow].[Time])-1))))
- [_this]+000:50:00<=MIN(SELECT(Reservations Table[Time],AND([Date]=[_thisRow].[Date],HOUR([Time])=HOUR([_thisRow].[Time])+1))))
- [_this]+000:50:00<=MAX(SELECT(Reservations Table[Time],AND([Date]=[_thisRow].[Date],HOUR([Time])=HOUR([_thisRow].[Time])))))
- [_this]-000:50:00>=MIN(SELECT(Reservations Table[Time],AND([Date]=[_thisRow].[Date],HOUR([Time])=HOUR([_thisRow].[Time])))))
This sample app shows a different approach how to do it and show your booked times. You can find it from appsheet.com/portfolio/77079.
1 Like
Thank you for your assistance. I have one additional query regarding the implementation of the previously mentioned scheduling features within the context of the following table:
I would greatly appreciate your guidance on how to apply these features effectively.