See the Business Modeler Guide for instructions on defining dimensions. In addition, units of measure can be entered using any supported units as shown in the pull-down list. Refer to Appendix: Selectables, for the options available for displaying units of measure information. For example, to include a column for a Weight attribute that includes kg, lb, and gm units, this selectable can be defined: attribute[attribute_Weight].value The returned value includes both the numeric value and the units, such as "10 kg". If the user has set a preference (see Configurable Preference Pages, then the column shows both the as-entered format followed by the preferred format in parentheses. For example, if the value was entered as "1.1 yd" and the user's preference is Metric, then the value in the column shows as: 1.1 yd (1 m) For the preferred values to display, the units in the dimension must be mapped to English or Metric using the system modifier as described in the MQL Guide. If the mapping is not configured, no preferred values will display even if the units have been defined. If you use a subselect expression to populate the column, such as attribute[Weight].inputvalue, then the column shows the result of the select expression and does not use the preference setting. To continue the above example, the column value would be: 1.1 yd because that was the input value/units. You do not need to update existing JPOs to use the Unit of Measure selectables. For example, a JPO was written using a selectable for an attribute not configured with a dimension. The JPO would use attribute.value as the selectable to retrieve the value, and that value would be what the user entered without any conversions. If the attribute was subsequently configured with a dimension, the framework intercepts attribute.value and replaces it with attribute.inputvalue.tostring. The value returned to the JPO is the same as it would have been prior to adding the dimension to the attribute. To display the normalized value without units, that is, the value actually stored in the database, you can use the format=alphanumeric setting (see Settings for Table Column Objects). To continue the above example, if the dimension is normalized on cm, then using this format setting would result in the column value of: 100 For columns displayed in editable tables, only the as-entered units of measure are shown. |