Represents a single range of valid values for a service mode. Typically table numbers / seating locations.
Required
isComplexRange :
bool
A complex range (true value) use RangeFormula to calculate the range of valid values.
A simple range (false value) uses RangeFrom and RangeTo to calculate the range of valid values.
Nullable
MaxLength(256)
rangeFormula :
string
Only set if IsComplexRange is true
A formula is a set of string encoded segments. Each segment must contain either a range / list of valid values. Each segment may also include a
and optional name and prefix
A segment represents a rule for filling out a set of (inclusive) values that is defined by surrounding a range/list with curly braces {}.
Segments support ranges AND lists of characters in the range a-z A-Z and 0-9.
Segment Range: {0-10} represents the numbers from 0 to 10. {A-F} represents the letters A to F. Multi character (non numerical) ranges can also
be defined but the start/end range must have the same length. For example {A1-C2} would represent A1, A2, B1, B2, C1, C2
Segment List: {BLUE|RED} represents either BLUE or RED as valid values.
Segment Prefix: Any text not belonging to another segment that appears before a segment will prefix all values from the segment. For example,
PFX#{0-2} will represent PFX#0, PFX#1, PFX#2,
Segment name: Any text preceeding a segment that is enclosed in square brackets [] will form the segment name. This should be used when prompting a user
to enter a value as a description of the value they are entering. For example [Select Floor]{1-3} will represent 1,2,3 but when prompting a user to enter
one of these values they should be shown "Select Floor"
A formula can contain multiple segments in which case the valid set of values is every permutation of each segment. For example {UP|LOW}{0-11}{X|Y} would
represent values UP0X, UP0Y, UP1X, UP1Y ... LOW11X, LOW11Y
Nullable
rangeFrom :
number (int)
For simple ranges this will be the inclusive beginning of a range of numerical values
Nullable
rangeTo :
number (int)
For simple ranges this will be the inclusive end of a range of numerical values
Example
{
"isComplexRange": true,
"rangeFormula": "string value",
"rangeFrom": 321,
"rangeTo": 321
}