Units of measure

Number fields have a unit of measure associated with them. The unit of measure is associated with a Number field as part of its definition. The definition of a Number field is discussed in "Number fields".

A number's unit may be displayed in a form or not. For example, in a form that displays textbook information, the textbook height may consist of two fields, one for the height value (such as 7) and one for the unit of measure (such as inches).

The units of measure are displayed as the selected item in a list. The list contains other units of measure that are used to measure the same kind of thing (such as length or weight). For example, with inches, the kind of thing being measured is length. Some of the other units of measure in the list may be feet, yards, meters and centimeters.

When a form is initially displayed, it shows numbers with the unit of measure that they are stored with. If the Width and Height fields in a form initially display with inches selected, we know that these numbers are stored as inches.

If we select a different unit of measure, the number is converted to the selected unit of measure. For example if we change the unit for Width from inches to centimeters, the number changes from 7 to 17.78. You will need to save the record before the conversion applies.

When someone enters a value for a number and selects its unit of measure, that number and the selected unit of measure are stored in the record's field.

Based on the ability of the IBM TRIRIGA Application Platform to handle different kinds of measurements, we see that it knows about different kinds of measurement such as length, angles, and mass. It knows about specific units used for each kind of measurement. For example it knows that length is measured in units such as inches, feet, yards, meters and kilometers. It knows that area is measured in units such as acres and square yards. It is also clear that it knows how to convert between different units that measure the same kind of thing.

The IBM TRIRIGA Application Platform uses two kinds of records to represent its knowledge about units of measure:

  • UOM_Type records are used to describe kinds of things that can be measured.
  • UOM_Values records are used to describe actual units of measure and how to convert between them.

The IBM TRIRIGA Application Platform comes with records that describe most common kinds of measurements and most common units of measure. If all the kinds of measurement and units of measure your application will need are already in the IBM TRIRIGA Application Platform, feel free to skip ahead to "Number formats".

If your application needs to use measurements that are not already in the IBM TRIRIGA Application Platform environment, see the following "Example: Managing units of measure".