Number fields

Use Number fields for numeric and currency data.

Numeric fields

The Number field type lets you limit a field to numerical values and define how the numbers display in a form. For example, a Monthly Total field in a Budget form adds together all of the numeric values from the fields listed in the following formula to arrive at a total budget figure:

Advertising + Entertainment + Miscellaneous + Overhead + Salaries + Travel

If you don't want users to change the value of a numeric field, select a Computed option in the Field Properties box. In the previous example, the Monthly Total field is computed so users cannot edit the value.

Fields used in calculations must have default values. Otherwise, the message "Incorrect data type for operator or @Function: Text expected" appears.

On the Control tab of the Field Properties box, you can specify whether the field should display formats according to the custom settings you specify, or whether it should use the default settings of the user's workstation.

Choose any of these number formats on the Control tab:

  • Decimal displays numbers either as they are entered (zeroes following the decimal point are suppressed), or with a fixed number of decimal places, depending on what you specify. To base the decimal symbol and thousands separator display on the type of measurement (Imperial or Metric) users set in the operating system's International User Preferences, choose Client. To set the decimal symbol and thousands separator yourself, choose Custom.
    Note: A number field can store up to 8 non-zero decimal digits without loss of precision. Notes® implements floating point arithmetic using the IEEE64 industry standard. In cases where a user enters more than 8 non-zero decimal digits, rounding may occur and the number may display and be stored differently from the number the user entered.
  • Percent displays a number as a percentage. For example, .12 displays as 12% and 12 displays as 1200%.
  • Scientific displays numbers using exponential notation. For example, 10,000 displays as 1.00E+04. Select the number of decimal places from the Decimal Places list.
  • Currency displays values with the currency symbol you specify. The default is the American dollar sign. For example, $15.00 is displayed when the value is 15 and "2" is selected in the Decimal Places list. You can select a different currency symbol from the list, or enter a custom currency symbol and country code. See the next section for more on currency fields.

Domino® Designer recognizes the following formats for numbers:

Type

Format

Integers

123, -123

Decimal fractions

1.23, 0.12, -.12

Scientific notation

1.23E2, -1.23E12

Currency

$2.50, ($600.09)

Domino® can store numbers from 2.225E-308 to 1.798E308 with 14-digit accuracy.

Currency fields

To choose currency as the type you want for the number field, check Currency at the Control tab of the Fields Properties box. For currency, you may want different fields to display different currency formats and you can do that at a field level.

If you want to use the currency defined in the user's preferences, select "Use preferences from: User settings." If you want to define a custom currency, select "Use preferences from: Custom."

If you have selected "Use preferences from: Custom," you have additional options in the "Currency symbol" section of the Control tab. You can choose a currency symbol from an extensive pull-down list. If you decide to check Custom, the currency you have chosen appears in the first box next to Custom (or you can choose another currency symbol) and the country code associated with this currency appears in the second box. You can then modify the country code. For example, the dollar sign ($) as a currency symbol is used in many countries, including Canada, Jamaica, and the United States, and has different values in each of these countries. For this reason, you may need to change the country code to one you want to associate with this currency symbol. For a full list of countries and their ISO country codes, see http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html.

If the symbol you need is not included in the list, you can create a custom currency symbol by pasting in the ASCII character for the currency symbol and then choosing a corresponding country code from the pull-down list of country codes.

CAUTION: Applying different currency formats, such as displaying British pounds in one field and American dollars in another, might result in unexpected results if you combine values using the formula language or a scripting language.