Skip to main content
Learning
Number formatting

A number format is a way to control how a number looks when it's displayed. It allows you to choose how many digits you want to show before or after the decimal point. It also lets you decide if negative numbers should be displayed differently from positive numbers.

Number formats take the form of one or more placeholders.

Applies To
  • Form Elements: Capture Data and Display Data
  • Data Types: Number, Number{}

Setting display formats

You can set display formats within an Activity or Trigger form. To do this, open the form builder.

On the form, select a Display Data or Capture Data element that uses one of the supported data types. When selected, the right-hand property panel will show options related to that data type.

To set the format, type the desired format string directly into the Display format field in the property panel.

image

Number display format property

Supported number formats

PlaceholderDescription
#The hash (#) digit placeholder is used to display a digit if there is one in its position in the data. It doesn't display any extra zeros at the beginning or end. If there are more digits to the left of the decimal point than there are placeholders, all the digits are shown. If there are more digits to the right of the decimal point than there are placeholders, the fraction is rounded to fit the number of placeholders.
0The zero (0) placeholder is a digit placeholder used to show a digit in a specific position. If there is a digit in that position, it will be displayed. If there isn't a digit, a zero will be shown instead. The zero placeholder also shows any extra zeros before or after the number. When there are more digits in the number than there are placeholders to the left of the decimal point, all the digits will be shown. If there are more digits than placeholders to the right of the decimal point, the number will be rounded to fit the available placeholders.
.A decimal point placeholder is a symbol used to control the number of digits shown on both sides of the decimal point.
,A thousands separator, when separated by digit placeholders (# or 0), the separator separates thousands from hundreds within a number that has four or more digits to the left of the decimal.
%When the percent symbol is present, the number value is multiplied by 100 and the result is shown as a percentage.
;A positive/negative separator, which when present allows different formatting for a positive (left of ;) and negative (right of ;) to be specified.

Examples

NumberFormatDisplay
12345.67#,###12,346
12345.67#.#12345.7
12345.67#.00012345.670
12345#.00012345.000
12345#.###12345.0
0.1#.###.1
0.10.###0.1
0.1#%.010.0%
2198.361£#,###.00;-£#,###.00£2,198.36
-2198.361£#,###.00;-£#,###.00-£2,198.36

Literal text

To add regular text in number patterns, just include it with the pattern - for example, £#,##0.00.