Format Number

Format Number

Logic name

Format Number (Document Mapper/Variable Mapper/Merge Mapper)

Function

This logic outputs the input number in the specified format (DecimalFormat).

Data types

Location

Type

First input handler

Numeric

Logic output

String

= Hint =

Refer to the following for details:

Properties

Category

Property

Description

Required settings

Format

Specify the numeral format of the output.

Comment

Comment

You can write a description of the logic. It doesn't affect the conversion process.

Function details

Format

The specified format is used when numbers are converted to strings.

Symbol

Position

Meaning

0

Numeric

Number.

#

Numeric

Number. This symbol isn't shown in the case of zero.

.

Numeric

Delimiter for digits of number or currency.

-

Numeric

Minus sign.

E

Numeric

Separates the mantissa and the exponent in scientific notation. Quotation marks don't need to be put around prefixes or suffixes.

%

Prefix or suffix

Multiplies by 100 and represents in percentage

Format notation example

Input value (number)

Format

Output value (string)

0.25

###.0%

25.0%

12.34

#

12

1234

0.###E0

1.234E3

Rounding error

The result is rounded to "the closest number" to the specified format. However, if the result is equidistant to both adjacent numbers, it is rounded to the even number. This rounding method minimizes accumulated rounding error when applied repeatedly to a sequence of calculations.

= Hint =

It isn't rounding off. Use the logic "Rounding" to round off numbers.

Logic sample

Mapping definition

Logic settings and processing result

This logic processes the input numbers in the "##0.0%" format and outputs as a string.

Property settings

Property

Setting

Format

##0.0%

Input data

0.25

1

0.0012

Output data

25.0%

100.0%

0.1%

 

= Hint =

For a list of logics, refer to Mapper Logic Guide.