Add a New NUMERIC RANGE DomainYou use the NUMRANGE Domain dialog box to add a new domain that uses one of the numeric data types, but for which you specify a range rather than specific values.
You can specify the following two kinds of ranges:
discrete – a range with a defined interval between values, for example, a range from 0 to 10, with valid values 0, 2, 4, 6, 8, and 10. The interval in this example is 2.
continuous – a range within which any value that satisfies the data type is valid. For example, in a range of 1 to 6 with a decimal data type and scale of 2, values such as 1, 1.03, 2.14, 3, 4.73, 5.2, and 6 are all valid. The interval in this example is null (no value in the Interval field).
You cannot create a lookups for NUMERIC RANGE domains. Therefore, consider the types of values a user or automated process will normally enter into a field with his type of domain. An invalid value will result in an error message.
Open the Domains (SP) application.
At the bottom of the Domains table window, click Add New Domain and select Add New NUMERIC RANGE Domain. The NUMRANGE Domain dialog box opens.
In the Domain field, enter a name for the domain.
In the Domain Description field, enter a short description.
In the Data Type field, enter a valid data type or click Select Value . The choices are: FLOAT, SMALLINT, INTEGER, DURATION, DECIMAL, and AMOUNT.
Depending on the data type the Length field may or may not be editable. If editable, enter a length that is equal to or less than the length of the field that will use the domain. For example, if you are adding a domain for a field in the Assets (SP) application that has a length of 12, then specify a length of 12.
Since you can use a domain with multiple fields, the length you specify here must be less than or equal to the length of the shortest field you will use the domain with. For example, if you want to use the domain with three fields of lengths 8, 10, and 12, specify a length of 8 or less for the domain.
Note: If you specify a length greater than the field the domain is used in, you will not be able to assign the domain to the attribute in Database Configuration. Alternatively, you can specify a greater length here and later go to Database Configuration and change the length of the field that uses the domain.
For DECIMAL data type only: In the Scale field, enter a scale value if different from the default, 2.
Click New Row. Each row defines a range.
In the Range Segment field, enter an identifying number for the segment, for example, 1 if the range has just one segment, or 1, 2, or 3 if the domain has three segments.
For a range with regular intervals or a simple continuous range, you only need 1 segment. See Multiple Segments, below, for some examples of using numeric ranges with more than one segment.
In the Range Minimum field, enter the lowest value in the range, for example, 10 in the range 10 to 50.
In the Range Maximum field, enter the highest value in the range, for example, 50 in the range 10 to 50.
Note: You can leave the Range Minimum or Range Maximum field empty (null value), but not both.
In the Interval field, for a range with discrete values, enter the value of the interval that separates the values you want to appear in the list. For example, the interval is 10 in the range 10 to 50 if you want the values 10, 20, 30, 40, and 50 to be valid.
For a continuous range of values between the minimum and maximum values, leave this field null (empty).
Note: Continuous is relative to the data type. For example, if the data type is INTEGER and the range is 1 to 5, then only 1, 2, 3, 4, and 5 are valid values.
The system by default applies domains at the system level. If you want a domain value to apply to a specific organization or site, enter the relevant values in the Organization and Site fields.
Note: Either leave the Organization and/or Site fields empty for all range segments (users in all organizations and sites can access them) or specify organization and/or site for all range segments (only users in the specified organizations and/or sites can access them).
In the Customer field, select a customer value to associate the domain with a customer and restrict use of the domain to objects that are associated with the same customer.
Click New Row again to add ranges for additional segments, or click Close Details .
Click OK.
You have now added a new domain to the database. However, you must still attach the domain to the object/attribute you want the domain to be used with, as well as other tasks.
Note: You cannot create a lookup for a NUMERIC RANGE domain.
You might use multiple segments for various reasons. Two examples follow:
Suppose you wanted to define a measurement range that was more precise at low measurements than at high measurements and that corresponded with meter readings. You could define three segments:
Segment 1: minimum 0, maximum .8, interval .2, resulting
valid values, 0,
.2, .4, .6, .8
Segment 2: minimum 1, maximum 9, interval 1, resulting valid values 1,
2, 3, 4, 5, 6, 7, 8, 9
Segment 3: minimum 10, maximum 30, interval 5, resulting valid values 10,
15, 20, 25, 30
A user or automated process would always enter one of those values.
Suppose you only wanted values inserted into a field only if the reported values were beyond the accepted normal range, for example, meter readings below or above accepted tolerances. You could define two segments:
Segment 1: minimum 0, maximum 9.9, interval null. Any reading
between 0 and 9.9 could be entered.
Segment 2: minimum 20.1, maximum null, interval null. Any readying of 20.1
or higher could be entered.
Meter readings from 10 and 20 would not be recorded.