rbf_formatNumber()

Warning: Support for using this method with external objects (such as those mapped to external tables, to OpenEdge Service objects, or through a HDP connection) is a beta feature. This method is supported in production systems, except for external objects.

Purpose

Formats a given number into a decimal string.

Syntax

rbf_formatNumber(value, decPlaces, decSeparator, thsSep)

Parameters

value

The number to format

decPlaces

The number of decimal places (2 by default)

decSeparator

The symbol used to separate the integer part from the fractional part of a decimal number. ("." by default)

thsSep

The thousands separator (none by default).

Note: This API is supported in portals as well.

Example

var x = rbf_formatNumber(7000123.45,4,'.',',');

Result: 7,000,123.4500