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
| Pattern | Example output |
|---|---|
#,##0 | 1,234,568 |
#,##0.0 | 1,234,567.9 |
#,##0.00 | 1,234,567.89 |
#,##0.000 | 1,234,567.890 |
#,##0.0000 | 1,234,567.8900 |
#,##0.00000 | 1,234,567.89000 |
#,##0k | 1,235k |
#,##0.0k | 1,234.6k |
#,##0.00k | 1,234.57k |
#,##0.000k | 1,234.568k |
#,##0m | 1m |
#,##0.0m | 1.2m |
#,##0.00m | 1.23m |
#,##0.000m | 1.235m |
#,##0b | 1b |
#,##0.0b | 1.2b |
#,##0.00b | 1.23b |
#,##0.000b | 1.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
| Character | Also 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
| Character | Also 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 Instruction | Pattern |
|---|---|
| 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
Formatinstructions 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
Formatinput. - 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,000would 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.