Format

As with date/time modifiers, numeric modifier formats can control the way in which numbers are displayed. The formatSpecifier table below shows the supported options along with an example of each. The examples are based on the number 12345.67890.

Syntax

NumericFormat(inputNumber, formatSpecifier, reqDecimalPlaces, customFormat)

Enabled For

For a description of the business object categories, see Notes on "Enabled For".

Business Object Category Yes/No
Business Rules: Before-Save Rules Yes
Business Rules: Calculation Rules (After Save, with or without Also Recalculate on Load) Yes1
Business Rules: Calculation Rules (Before Save or Always, without Also Recalculate On Load) Yes
Business Rules: Calculation Rules (Before Save or Always, with Recalculate On Load) Yes1
Business Rules: Editing Rules Yes
Business Rules: Initialization Rules Yes
Business Rules: Read Only Rules Yes
Business Rules: Required Rules Yes
Business Rules: Validation Rules Yes
Client Expressions Yes
Object Permissions No
Services No
LDAP No
Mobile No
Quick Actions (except UI Quick Actions) Yes
UI Quick Actions Yes
Reports Yes
Search/Dashboard without field references No
Search/Dashboard with field references No

1. Not fully supported in calculation rules that have a condition of After Save or the Also Recalculate on Load option selected. It may fail if the rule's field is used in a grid, form, or saved search.

Parameters

Parameter Description
inputNumber Input value to Format (Number value)

formatSpecifier

Format to apply

reqDecimalPlaces

(Optional) Number of decimal places

customFormat

(Optional) Custom Format

Return Value

Returns a string in given type of Format.

Examples

$(NumericFormat(123, 'CUSTOM', 2, '00000'))

Returns this value:

00123

$(NumericFormat("98765.4321", "CUSTOM", 2, "##-##-##"))

Returns this value:

-9-87-65

$(NumericFormat("98765.43210", "NUMBER"))

Returns this value:

98,765.43

formatSpecifier

Format Example
Number 12345.68

Number (set decimals)

12345.7 (one decimal place)

General

12345.6789

Currency

$12345.68

Currency (set decimals)

$12345.678 (three decimal places)

Fixed Point

12345.68

Fixed Point (set decimals)

12345.679 (three decimal places)

Percent

12345.6789

Percent (set decimals)

1,234,567.890% (three decimal places)

Scientific

1.234568E+ 004

Hexadecimal

ABCD (from value 43987)

Custom

Requires knowledge of the legal .NET numeric formats. For example, F3 would return 12345.679. See the Microsoft Documentation for more information.