Defining a Conversion Rate Preference

You can define conversion rates for English and Metric units. Perform the steps in this procedure for each English unit that you want users to be able to convert to a Metric unit.

  1. In Business Modeler, define range values for each conversion rate you want to define:

    1. Open the Unit of Measure attribute for editing.



    2. Click the Ranges tab.

    3. For each new range value, click Add and enter a name.
    4. Click Edit.

  2. To enter the conversion rates using Matrix Navigator or PowerWeb, follow these steps for each Unit Conversion.

    1. Click Object > New > Original.
    2. Select Unit Conversion as the type.

  3. Enter a name that matches the English unit and the Revision matches the Metric unit. Both units must be added to the range values for the Unit of Measure attribute.

  4. In the Rate field, enter the conversion rate between the English and Metric unit.



  5. Click Modify.

  6. To display the table with the converted measurement data in the new window, the table component uses Tag Lib. The following table lists column settings that need to be configured for Unit of Measure columns.

    Taglib Parameter Column Setting Description

    map

    Table component obtains the conversion map from the system using the bean UnitConversion.

    from

    UOM Expression

    The name of the Unit of Measure from which to convert.

    The Unit of Measure Expression setting for the table column is assigned to a select clause, which provides the value for the Unit of Measure attribute for a specific object or relationship.

    For example, for data for RFQ Quotations, the following select clause returns the currency format.

    to[Supplier Line Item].attribute[Unit of Measure]

    to

    The name of the unit of measure to convert.

    The value for this "to" parameter is obtained from the session and is the preferred currency selected by the user.

    If not defined, no conversion is applied.

    value

    Actual value to display in the column (measurement value obtained from database).

    decimalSeparator

    Decimal separator symbol that should be used for displaying the measurement value. This symbol is defined in emxSystem.properties using the key:

    emxFramework.DecimalSymbol = .

    digitSeparatorPreference

    Determines whether to display a thousandths separator for currency and quantity fields (for example, 1,000). This symbol is defined in emxSystem.properties using the key:

    emxFramework.DigitSeparator = false

    For example:

    <framework:convertUnit
           map = <%=UnitConversion.getUnitConversionMap(context)%>
                  from="IN (inch)"
                  to="English"
                  value="22323"
                  decimalSeparator="."
                  digitSeparatorPreference="true"