Job Runner

Format Number

Summary

Create formatted string from a number.

How to Use

You can get the original number value by using formulas to access another field or the result of another action.

The formatted string is set as the result of the action.

To get the conversion result, use a formula to reference this action from other actions.

For example, if the action of “Format Number” is the first action, you can get the results by setting value in the parameter “Set Field Value” as follows:

=$1

Also,

to combine the result with strings, you can use the formula as follows:

="Market value " & $1 & "¥"

This example can add a string and a currency symbol before and after the result.

Parameter

Set Number, Display the Thousands Separator, Integer Part Digits, Fill Integer Part with Zero, Number of Decimal Places, Fill Decimal Part with Zero.

Number

Enter the number to format.

To access the value of another field, enter the field code as follows:

=Number_2

Insert an equals sign “=” before the field code to access the value of that field.

You can insert additional formulas to perform arithmetic operations on the number value, as follows:

=Number_2 * 100

Display the Thousands Separator

Select “Display the thousands separators” to insert a comma after every third digit in the integer part.

Integer Part Digits

Specify how many digits should be included in the integer part. The parameter ignores comma separators and digits after the decimal point.

If the number of digits exceeds the limit specified by this parameter, the upper digits will be omitted. For example, only the last three digits will be shown if you input “3” in the “Integer Part Digits” parameter.

If you leave this parameter empty, all digits in the integer part will be displayed without omission, zero-padding or other modifications.

Fill Integer Part with Zero

You can use this parameter to decide whether the Do should zero-pad numbers that have fewer digits than the value you specified in the parameter “Integer Part Digits“.

The value in this parameter is ignored if the value in the parameter “Integer Part Digits” is empty.

For example, if the number to be formatted is “512” and you enable zero-padding, setting the “Integer Part Digits” to “5” will result in the number “00512.”

You can enable thousands of separations and zero-padding of the integer part at the same time. If you enable both, the zeros will also be comma-separated. For example, if the number to be formatted is “1512” and you enable zero-padding, setting the “Integer Part Digits” to “5” will result in the number “01,512.”

Number of Decimal Places

Use this parameter to round the number to the nearest whole number.

If you leave this parameter empty, all digits that are stored internally will be shown.

Fill Decimal Part with Zero

Use this parameter to decide whether to zero-pad numbers with fewer digits than the value you specified in the “Number of Decimal Places” parameter.

The value in this parameter is ignored if the value in the parameter “Number of Decimal Places” is empty.

For example, if the number to be formatted is “0.5”, setting the “Number of Decimal Places” to “3” will result in the number “0.500.”

Restrictions

  • Do not input values that are not finite integers in the parameters “Integer Part Digits” or “Number of Decimal Places”. Inputting decimals or infinite numbers will result in undefined behavior.