Range Clause for Add Attribute Command

The Range clause defines the range of values the attribute can assume. This range provides a level of error detection and gives the user a way of searching a list of attribute values.

If the attribute uses the enum type, do not use the range clause to assign range values. For more information, see Type Clause for the Add Attribute Command.

See Also
Range Compared with a Relational Operator for the Add Attribute Command
Range Compared with a Pattern (Special Character String) for the Add Attribute Command
Multiple Ranges for the Add Attribute Command
Ranges Defined Within a Program for the Add Attribute Command

If you define an attribute as having a specific range, any value the user tries to assign to that attribute is checked to determine if it is within that range. Only values within the defined range are allowed.

When writing a Range clause, use one of the following forms depending on the types and amount of range values:

range RELATONAL_OPERATOR VALUE
range PATTERN_OPERATOR PATTERN
range between VALUE {inclusive|exclusive} VALUE {inclusive|exclusive}
range program PROG_NAME [input ARG_STRING]

If you have an attribute with a default value that is outside the ranges defined (such as “Undefined”) and you try to create a business object without changing the attribute value, the default value against the ranges is not checked. A check trigger could be written on the attribute to force a user to enter a value.

The method and clauses you use to define a range are a matter of preference. Select the clauses that make the most sense to you and then test the range to be sure it includes only valid values.