Creating currency fields


Use this process to create currency fields:

  1. Add a currency field to a form. (See the procedure below.)
  2. Create currency exchange ratios. (See Creating-currency-exchange-ratios.)

For each currency field, you specify allowable and functional currencies:

  • Allowable currencies are the types of currencies that users can enter in a currency field. Codes for allowable currencies appear in a menu attached to the field. For each currency field, application developers can specify a primary allowable currency to use when users do not specify a currency code. If the developer does not specify a primary currency, the system uses a default.
    Although the default in Developer Studio is all allowable currencies, include only what is necessary for your applications. For every allowable currency, you must create a matrix of currency ratio values to support converting every allowable currency to a different functional currency.
  • Functional currencies are the currencies into which the user-entered currency is converted when users save a request. For example, if a user enters 7.00 USD and the field's functional currencies are EUR and JPY, 7.00 USD is converted into the corresponding EUR and JPY values (see Creating-currency-exchange-ratios). Applications can use these preconverted values, which are stored with the field, to search, report, and run qualifications without spending additional processing time to convert the user-entered value at runtime.
    The server uses the first functional currency entered to evaluate workflow comparisons and process workflow actions.

Before you begin

Set the default allowable and function currency types in the AR System Administration: Server Information form (see Setting-currency-types). The defaults appear in the Currency Types property dialog box of all new currency fields.

Important

ODBC drivers are not supported in SaaS environments. For on-premises deployments, we do not recommend using ODBC drivers.


To add a currency field to a form

  1. Open the appropriate form.
  2. Right-click the form, and select Create a New Field > Currency.
    The new field appears on the form.
  3. Select the field.
  4. In the Properties tab, select the Currency Types property, and click its ellipsis button.
    If default allowable currency types are not specified in the AR System Administration: Server Information form, all the available currency types are selected in the Currency Types dialog box on the Allowable Currency Types tab, as shown in the following figure. 

    Initial Allowable Currency Types tab without default currencies
    currency_types_db_without_defaults.gif


    If defaults are specified in the AR System Administration: Server Information form, those default currencies are selected on the Allowable Currency Types tab. For example, see the following figure. 

    Initial Allowable Currency Types tab with default currencies
    currency_types_db_with defaults.gif

    Tip

    Although BMC Developer Studio might default to using all allowable currencies when a currency field is created, select only the relevant currencies for your locale to avoid the overhead of too many conversions.

  5. To change the allowable currencies for this field, perform these tasks in the Allowable Currency Types tab:
    1. In the Select Types field, select the Customize option.
    2. Use the arrow buttons to move currencies to and from the Available Types and Selected Types lists.
      Currencies in the Selected Types list appear in the menu attached to the currency field. For example: 
      currency_field_code_menu.gif
      If you remove all currencies from the Selected Types list, all the available currencies are allowed and appear in the menu.
    3. (Optional) To change a currency's decimal precision, click the precision field in the Selected Types list, and select a precision value from the drop-down list.
    4. In the Primary Currency list, select the currency to use when no currency code is entered in the currency field.
      If you do not select a primary currency, the first currency in the Selected Types list is used as the primary currency.
      For more information, see Data-fields.
  6. To change the functional currencies for this field, perform these tasks in the Functional Currency Types tab:
    1. Use the arrow buttons to move currencies to and from the Available Types and Selected Types lists.

      The Selected Types list must contain at least one currency. 

      Best practice
      There is no maximum number, but we recommend that you specify no more than five functional currencies to avoid delays when you submit requests.

    2. (Optional) To change a currency's decimal precision, click the precision field in the Selected Types list, and select a precision value from the drop-down list.

      The first functional currency that is defined is used in workflow evaluations and in searches. It is critical that you define a currency exchange ratio entry for the first function currency.

  7. Click OK.
  8. In the Properties tab, enter a name for the field.

    Important

    When the ODBC driver accesses a currency field (for example, when you run a report), it generates four or more column names for the field by adding these suffixes to the field name:

    • _Date
    • _Type
    • _Value
    • _functionalCurrencyCode

    The driver creates one column for each functional currency defined for the field. 

    If the form contains a field with a name that is the same as one of the generated names, the ODBC driver reports "Cannot define field more than once" and fails to get the data. 

    To avoid this issue, do not use field names that conflict with the column names generated by the ODBC driver for currency fields.

  9. Set one or both of these currency field properties:
    • Default Value — Specifies the value that appears in the field when a user initially opens the form in New mode. The value consists of a decimal number and an allowable currency code. This value overrides the Initial Currency Type field property value set in BMC Developer Studio and the initial currency type preference set in the AR System Preference form.
    • Initial Currency Type — Specifies the currency code that appears in the field when the form opens in New mode if there is no Default Value and if the user has not specified an initial currency type in the mid tier.
  10. Set the other field properties as needed.
    See Field-Properties.
  11. Select the field, drag it to a position in the form, and adjust its size.
    See Arranging-fields-in-a-form-view.
  12. Right-click the form, and select Save.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*