Skip to content

MODLR Number Formats

MODLR uses one number-format pattern syntax throughout the platform, not a different one per surface. The same pattern string works in NUMBERFORMAT, the Format Number node in Visual Processes, formula-driven Set Instructions, and Card formulas.

Full pattern reference

PatternExample output
#,##01,234,568
#,##0.01,234,567.9
#,##0.001,234,567.89
#,##0.0001,234,567.890
#,##0.00001,234,567.8900
#,##0.000001,234,567.89000
#,##0k1,235k
#,##0.0k1,234.6k
#,##0.00k1,234.57k
#,##0.000k1,234.568k
#,##0m1m
#,##0.0m1.2m
#,##0.00m1.23m
#,##0.000m1.235m
#,##0b1b
#,##0.0b1.2b
#,##0.00b1.23b
#,##0.000b1.235b
0%12%
0.0%12.3%
0.00%12.30%
0.000%12.300%

Regional separators

The comma and period in a pattern aren't fixed to grouping-comma and decimal-point - MODLR accepts a range of characters for each, so a pattern can match regional number formatting conventions instead of only the US style:

Grouping separator

CharacterAlso known as
,comma
.period
_underscore
'apostrophe
`backtick
(U+0020)space
(U+00A0)non-breaking space
(U+2009)thin space
(U+202F)narrow no-break space
، (U+060C)Arabic comma
· (U+00B7)middle dot

Decimal separator

CharacterAlso known as
.period
,comma
_underscore
:colon
، (U+060C)Arabic comma
· (U+00B7)middle dot

For example, a European-style pattern using . for grouping and , for decimals is written the same way the #,##0.00 examples above are, just with the two characters swapped.

Set Instructions shorthand

In a Workview, the Data Formatting instructions are named shortcuts for the most common patterns above - pick the instruction instead of typing the pattern:

Set InstructionPattern
Format 0,000#,##0
Format 0,000.0#,##0.0
Format 0,000.00#,##0.00
Format 0,000.000#,##0.000
Format 0,000.0000#,##0.0000
Format 0,000.00000#,##0.00000
Format 0%0%
Format 0.0%0.0%
Format 0.00%0.00%
Format 0.000%0.000%

There's no named Set Instruction for the k/m/b abbreviated patterns - reach for Apply Number Formatting Using Formula with the raw pattern instead when a Workview needs one of those.

Where these patterns are used

  • Set Instructions - the fixed Format instructions above use a pattern internally; Apply Number Formatting Using Formula takes a pattern directly, computed by formula.
  • Cube Formulas - NUMBERFORMAT(value, pattern) formats a number inline within any formula.
  • Visual Processes - the Format Number node takes the same pattern as its Format input.
  • Cards - display components (Text, Input, and others that render a value) have their own Format property that takes a pattern directly - the usual way to get the same formatting a Workview's Format 0,000 would produce. NUMBERFORMAT(value, pattern) is the alternative for a component without a Format property, or when the pattern itself needs to be computed conditionally rather than fixed.