@FORMAT_DECIMAL

The FORMAT_DECIMAL function converts the given decimal number parameter into a string. It takes up to five additional optional parameters that are used in formatting the converted string value. The first parameter is the value to be converted and is required. This parameter is evaluated as a decimal, though the value itself may be either an integral or decimal number data type. This function should be used for any read-only detail screen field displaying a decimal value.

Parameters

@FORMAT_DECIMAL (Decimal [, Precision, Use Thousands Separator, Use Lead Zero, Decimal Point, Thousands Separator])
Decimal
Required decimal number parameter; contains the value to be formatted to a string by the function. If this parameter is a decimal number property, the definition of that property’s rounding attributes will affect the final value, specifically when rounding to a specified precision.
Precision
Optional integral number parameter; contains the number of digits after the decimal to keep when converting Decimal. The last kept digit will be rounded. If Decimal is a decimal number property, the property’s rounding attributes will determine the behavior of rounding for the value returned. If Decimal is a decimal property, the precision defined for the property will take effect before the function applies any additional precision to the resulting string returned. If this value is not specified, the precision will be determined automatically by the function.
Use Thousands Separator
Optional Boolean parameter with a default value of false. When true, the final string value returned will contain a comma to denote thousands, millions, etc. When false, no comma will be present in the resulting string returned by the function.
Use Lead Zero
Optional Boolean parameter with a default value of false. When true, the final string value returned will contain a leading 0 in the ones position for decimals that contain only fractional values; e.g. when false or not specified .23; when true 0.23.
Decimal Point
Optional string parameter with a default value of a decimal point (.). This value may be set to any single character to be used in place of a decimal point. Many locales use a comma to denote the fractional portion of a decimal value.
Thousands Separator
Optional string parameter with a default value of comma (,). This value can be set to any single character to be used in place of a comma to separate thousands and hundreds, millions and hundred thousands, etc. This parameter is only evaluated by the function when Use Thousands Separator is true. Many locales use a period (.) as the separator character.

Supported Return Types

String