Block Group: | Number Formatting |
Icon: |
![]() |
Returns a number or string based on defined formatting criteria. If the input value's number of decimal places is greater than that of the specified format, the Format Number block rounds the value. If format is null, the default formatting is returned. This default formatting includes a thousands separator and all decimal places.
The following properties of the Filter block can take input and give output.
input specifies the number to format.
format specifies a combination of number format patterns to use. For example, you can format the value to be displayed as "1,050.40" with this format string: "#,###.00".
The following property of the Format Number block can give output but cannot take input.
output returns the formatted number.
The following image shows two examples of the Format Number block. The top Format Number block formats a decimal value so that the value appears as a percentage with a label. The bottom Format Number block rounds a number to the tenths place and includes a comma for a thousands separator.