number

This function formats a number and converts it to TEXT. It places thousand separators and enforces the number of decimals specified in the function call. Which symbols are used as thousand separator and decimal symbol is determined by the Output language setting in the ITP configuration window. You can find this setting in the Administrator of ITP/Server, under Environments.

number ( input_number; number_of_decimals )

The result of this function is of type TEXT, input_number will be formatted as TEXT.

This function has two parameters:

  1. input_number, type NUMBER. The unformatted number.
  2. number_of_decimals, type NUMBER. The number of decimals in the formatted number. Maximum of nine decimals.

Note

Default number representation

If you put a number into the result text without using a function like 'number', the following applies; the number is converted to the same number representation (TEXT) as would be attained by using the function number with second parameter, two decimals.

@( number( 1223.435; 2 ) )

Result: 1,223.44. Note that the input_number is rounded to achieve 2 decimals.

@( number( 1223.435; 5 ) ) 

Result: 1,223.43500. Zeros are used as decimals to show 5 decimals where only three are provided.


The following example shows the default format for a number in the result text (with the output language set to ENG):

@( 10000 ) 

Result: 10,000.00