...
Additionally, there are functions available for performing calculations and filtering lists. When linked to a dimension, you can access special variables like overlapping_reservations overlappingReservations and matchingAvailabilities to further rules for availability checking or double bookings.
...
When you link your rule to a dimension, two special variables will become available for use in the formula.
overlapping_reservationsoverlappingReservations
overlapping reservations with the reservation being checkedCOUNT(overlappingReservations) > 0
This rule would make sure that no overlapping reservation are allowedmatchingAvailablilities
Allowing you to use the availability or unavailability of the related dimension in your formula.COUNT(matchingAvailabilities) == 0
Reservation not allowed when there is no availability or if there are unavailabilities.
...
You can also reference and check the permissions of the running user in your rule.
By adding: $Permission.Custom_Permission_NameCOUNT(overlapping_reservationsoverlappingReservations) > 0 and $Permission.B25__ALLOW_DOUBLE_BOOKING == false
...
Reservation not allowed when overlapping with other reservation.
COUNT(overlapping_reservationsoverlappingReservations) > 0
Reservation not allowed if no availability
...
Reservation not allowed when overlapping with other reservations, not taking into account reservation with status “Canceled” AND status “Temporary”
COUNT(FILTER(overlapping_reservations overlappingReservations AS item, item.b25__status__r.name != ‘Canceled’ AND item.b25__status__r.name!="Temporary")) > 0
...
Resource__r.Allow_Double_Booking__c == false AND COUNT(overlapping_reservationsoverlappingReservations) > 0
Reservation not allowed when when overlapping with more reservations then specified at the “max capacity field specified on the related resource.
COUNT(overlapping_reservationsoverlappingReservations) > Resource__r.Max_Reservations__c
...
Reservations are not allowed to be double booked and when the running user doesn’t have the permission to “overrule double bookings”
COUNT(overlapping_reservationsoverlappingReservations) > 0 and $Permission.B25__ALLOW_DOUBLE_BOOKING == false
...