XFA Specification
Chapter 23, FormCalc Specification
Logical Built-in Functions
870
Within()
This logical function returns true if a value is within a given range.
Syntax
Within(s1, s2, s3)
Parameters
s1
is the value to test.
s2
is the lower bound of the range.
s3
is the upper bound of the range.
Returns
True (1) if the first parameter is within range, false (0) if it is not in range, or null if the first parameter is null.
If the first value is numeric then the ordering comparison is numeric.
If the first value is non-numeric then the ordering comparison uses the collating sequence for the current
locale.
Examples
Within("C", "A", "D")
returns true (1).
Within(1.5, 0, 2)
returns true (1).
Within(-1, 0, 2)
returns false (0).
Within($, 1, 10)
returns true (1) if the value of the current object is between 1 and 10.