APPLICATION DESIGN


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 example above, 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:


IBM® Lotus® Domino(TM) Designer recognizes the following formats for numbers:
TypeFormat
Integers123, ­123
Decimal fractions1.23, 0.12, ­.12
Scientific notation1.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.

See Also