Appian a!isBetween()
The range check used in validations. Both limits are outside the range, the parameters run upper before lower, and a backwards range is an error rather than a false.
Official Appian documentationOne call instead of two comparisons
Checking that a value falls inside a range takes two comparisons and an and():
and(ri!score > 1, ri!score < 6)
a!isBetween() is the same check, written so the range reads as one thing:
a!isBetween(value: ri!score, lowerLimit: 1, upperLimit: 6)
It returns a Boolean, and it works on numbers, dates and date-and-time values. Appian's page calls it a validation function, which is where you will meet it most: a!applyValidations(), a required-field rule, a filter on a query.
Both limits are outside the range
This is the part people get wrong. The range is exclusive at both ends: a value equal to a limit is not between them.
a!isBetween(value: 4, lowerLimit: 4, upperLimit: 6) → false a!isBetween(value: 6, lowerLimit: 4, upperLimit: 6) → false a!isBetween(value: 5, lowerLimit: 4, upperLimit: 6) → true
Business rules are usually written the other way round — "between 10 and 20" on a form nearly always includes 10 and 20. When the ends should count, a!isBetween() is the wrong function; write the comparisons out:
and(ri!quantity >= 10, ri!quantity <= 20)
Name the arguments, always
The parameter order is a!isBetween(value, upperLimit, lowerLimit) — upper before lower, which is the opposite of how the range is spoken and written. Positionally, "between 1 and 6" is:
a!isBetween(4, 6, 1)
Nobody reads that correctly at speed, and getting it backwards is an error rather than a wrong answer, so the mistake surfaces in production rather than in review. Use the keywords every time and the order stops mattering.
A backwards range is an error
The limits have to describe a range that could hold something. A lower limit at or above the upper limit fails the whole expression:
a!isBetween(value: 4, lowerLimit: 6, upperLimit: 1) → Invalid start value. a!isBetween(value: 4, lowerLimit: 6, upperLimit: 6) → Invalid start value.
It matters whenever the limits are computed rather than typed. Two dates that arrive in the wrong order, or a maximum that a user left blank, take the interface down instead of returning false.
A missing value is false
A null value, or a null limit, gives false. No guard needed:
a!isBetween(value: null, lowerLimit: 1, upperLimit: 6) → false
That is the behaviour you want in a validation: nothing entered yet is not "in range". It is also worth saying out loud, because false here means either "outside the range" or "no value at all". If those two need different messages, test for the null yourself first.
Dates work the same way
a!isBetween( value: ri!requested, lowerLimit: today(), upperLimit: today() + 90 )
A date counts as midnight, so a Date and a Date and Time can be compared against each other. Remember that both ends are still excluded: the range above does not include today or the ninetieth day.
Try it
Run each one and read what comes back before moving on.
1aCheck that 4 falls between 1 and 6.
a!isBetween(value: 4, lowerLimit: 1, upperLimit: 6)
1bNow move the lower limit up to the value itself.
a!isBetween(value: 4, lowerLimit: 4, upperLimit: 6)
2aDrop the keywords and pass 1 and 6 in the order you would say them.
a!isBetween(4, 1, 6)
2bSwap them to the documented order.
a!isBetween(4, 6, 1)
3Ask about a value that has not been entered yet.
a!isBetween(value: null, lowerLimit: 1, upperLimit: 6)
4Put a date in a March window.
a!isBetween( value: date(2026, 3, 15), lowerLimit: date(2026, 3, 1), upperLimit: date(2026, 3, 31) )
5aA quantity rule that reads "from 10 to 20": is 10 allowed?
a!isBetween(value: 10, lowerLimit: 10, upperLimit: 20)
5bWrite the inclusive version out instead.
and(10 >= 10, 10 <= 20)
Independent evaluator — approximates the Appian expression language and may differ from a real Appian environment. Verify anything that matters. Terms
Exercises
0 of 4 cleared- 1isBetween: a rating strictly between the endsEasy
- 2isBetween: an inclusive quantity ruleEasy
- 3isBetween: inside the booking windowMedium
- 4isBetween: readings outside the safe rangeMedium