isBetween: inside the booking window
Medium
A booking is valid when its date falls strictly between the window's first and last day. Return true when ri!booking is inside the window described by ri!opens and ri!closes.
The opening and closing dates are themselves outside the window. A booking with no date yet is not valid.
Inputs
ri!booking— Dateri!opens— Dateri!closes— Date
ri! Rule Inputs
ri!bookingDatedate(2026, 3, 15)
ri!opensDatedate(2026, 3, 1)
ri!closesDatedate(2026, 3, 31)
Example 1 — Mid-window
Input: ri!booking
date(2026, 3, 15)
Input: ri!opens
date(2026, 3, 1)
Input: ri!closes
date(2026, 3, 31)
Output:
true
Example 2 — On the opening day
Input: ri!booking
date(2026, 3, 1)
Input: ri!opens
date(2026, 3, 1)
Input: ri!closes
date(2026, 3, 31)
Output:
false
Example 3 — On the closing day
Input: ri!booking
date(2026, 3, 31)
Input: ri!opens
date(2026, 3, 1)
Input: ri!closes
date(2026, 3, 31)
Output:
false
Example 4 — Before the window opens
Input: ri!booking
date(2026, 2, 20)
Input: ri!opens
date(2026, 3, 1)
Input: ri!closes
date(2026, 3, 31)
Output:
false
Example 5 — Across a year end
Input: ri!booking
date(2027, 1, 2)
Input: ri!opens
date(2026, 12, 28)
Input: ri!closes
date(2027, 1, 5)
Output:
true
Example 6 — No date entered
Input: ri!booking
null
Input: ri!opens
date(2026, 3, 1)
Input: ri!closes
date(2026, 3, 31)
Output:
false
Appian Expression Tips
- • Use
ri!variableNamefor rule inputs - • Use
a!localVariables(local!x: …, body)for locals - • Use
a!forEach(items: …, expression: fv!item)to iterate - • Use
where()/reject(fn!isnull, list)to filter