ConvertFieldToCurrency

Converts the value of the current field to a currency value.

Syntax

bool ConvertFieldToCurrency ()

Parameters

Smart parameters are supported.

Returns

True if the text value is numeric and greater than one character. Otherwise, False.

Level

All levels, but generally applied at the Field level.

Details

Formats the text value of a field as a currency value. The following steps are performed on the field:
  1. Removes existing currency symbols.
  2. Replaces negative value characters such as parenthesis, 'NEG', 'CR' and trailing hyphen with a leading hyphen.
  3. If a decimal exists, its position is not changed.
  4. If a decimal does not exist and the field contains 2 or more characters, a decimal is inserted before the last two characters in the field.
  5. If a decimal does not exist and the field contains less than 2 characters, no decimal is inserted.
Example
ConvertFieldToCurrency()
A value of 1  remains 1
A value of 12  becomes .12
A value of 105  becomes 1.05
A value of 104.009  remains 104.009