Free cookie consent management tool by TermsFeed dollar() Function
dollar() Function

Function

dollar( number, decimals, no_commas )

Converts a decimal number into a dollar value by effectively adding a dollar sign ($), a decimal point, and optional comma for every three digits preceding the decimal.

Parameters

Keyword Type Description

number

Decimal

The number of dollars to be returned as text decimals.

decimals

Decimal

The number of digits after the decimal to display, 2 by default. Optional.

no_commas

Integer

An optional flag value indicating whether commas are used as number separators. It accepts 0 or 1. The default value is 0.

Returns

Text number

Usage considerations

Using the no_commas parameter

When the value for no_commas is 0, the dollar value displays a comma separator between every three and four digits that precede the decimal, when the number contains four or more digits before the decimal.

When the value for no_commas is 1, the dollar value is not separated by commas.

Formatting results

When displaying this value, you must use text formatting.

Examples

dollar(3213.43) returns $3,213.43

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Compatible
Offline Mobile Compatible
Sync-Time Custom Record Fields Incompatible
Real-Time Custom Record Fields Incompatible
Process Reports Compatible
Process Events Compatible
Open in Github Built: Thu, Apr 18, 2024 (09:37:52 PM)

dollar() Function

FEEDBACK