Value range property

Official Content
This documentation is valid for:
Indicates a range of valid values for attributes, variables or domains.


This property is not available when the attribute is a formula.

It is available for Web Panels as of GeneXus X Evolution 3 upgrade 2.

The verification that a value is within the established range is done at runtime when the value is entered in a form by an end user or in a Business Component by a program. When an assignment to an attribute is being performed by code, the value is not validated against the specified range.

If the validation of a value entered fails, an error message is automatically generated, indicating "%1 is out of range" (%1 is substituted by the name of the attribute).

Value Range Edition

In most cases you can edit and change the default Value Range, even if it is calculated automatically (inherited from domain or subtype). However, in enumerated domains the Value Range is calculated automatically too and in that specific case please do not change the value range.


<ValueRange> ::= <Range> | <Value> [<ValueRange>]
<Range>      ::= <FromValue> ":" <ToValue>
             | <FromValue> ":" [<ToValue>]
             | [<FromValue>] ":" <ToValue>
<FromValue>  ::= <Value>
<ToValue>    ::= <Value>
<Value>      ::= <NumericConstant>
             | <StringConstant>
             | <DateConstant>


1:20 30: means the valid values are between 1 and 20 and greater than or equal to 30.
1 2 3 4: means the valid value can be either 1, 2, 3 or 4.
'Y' 'N': means the valid value can be either 'Y' or 'N'.
#1753-01-01#:#2010-03-07#: means a date range.


Objects: Domain, Transaction, Web Panel
Controls: Attribute

See Also

Regular Expression property
Validation Failed Message property
Attribute definition
Numeric data type