...
Operation | Description |
---|---|
== | Checks if two values are equal. Returns true if they are, false otherwise. |
!= | Checks if two values are not equal. Returns true if they are not, false otherwise. |
> | Checks if the left value is greater than the right value. Returns true if it is, false otherwise. |
>= | Checks if the left value is greater than or equal to the right value. Returns true if it is, false otherwise. |
< | Checks if the left value is less than the right value. Returns true if it is, false otherwise. |
<= | Checks if the left value is less than or equal to the right value. Returns true if it is, false otherwise. |
CONTAINS | Checks if a text value contains a specified substring. Returns true if it does, false otherwise. |
STARTSWITH | Checks if a text value starts with the specified substring. For example |
LIKE | Performs a pattern matching comparison between a text value and a specified pattern. Returns true if the pattern matches, false otherwise. |
NOT | Negates the Boolean value of an expression. Returns true if the expression is false, false if it is true. |
ISBLANK | Checks if a field or expression is blank (empty) or null. Returns true if it is blank, false otherwise. |
[index] | Array index operator. Returns the element at the specified index in a list (starting with zero). For example |
Functions
Rules serve different functions, with some of them returning numerical values that you can use in your formula.
...
overlappingReservations
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.
This list ofB25__Availability__c
records is ordered from most important to least important.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(overlappingReservations) > 0 and $Permission.B25__ALLOW_DOUBLE_BOOKING == false
...
Example rules
...
Note |
---|
Important is that when the result is true, the reservation will be blocked. This is why we call the rules “Conflict Rules”. |
Basic rules
Reservation not allowed when title matches invalid.
...
COUNT(matchingAvailabilities) == 0
Or instead of the above formula, you can use the special method isNotAvailable()
More advanced rules
Reservation not allowed when overlapping with other reservations, not taking into account reservation with status “Canceled” AND status “Temporary”
...
Overlapping reservation containing reservations from other resources. Resource grouping
Services
“Unshared conflict checking” Shared vs Unshared Conflict Checking
Timeslot picker Time Slot Picker (for record pages)