FunctionCopy link to clipboard
todecimal( value )
Converts a value to Decimal (double-precision floating-point number).
ParametersCopy link to clipboard
Keyword | Type | Description |
---|---|---|
|
Any Type |
Value to convert. |
ReturnsCopy link to clipboard
Decimal
Usage considerationsCopy link to clipboard
Numbers less than -10,000,000 and greater than 10,000,000 are represented in scientific notation.
When operating on arrays, it is not necessary to use apply
with todecimal
. If multiple parameters are passed, or one parameter is an Array, todecimal
will return a Decimal Array.
ExamplesCopy link to clipboard
Convert strings to decimalsCopy link to clipboard
1
todecimal("3.6")
Copy
Returns 3.6
.
1
todecimal("1.123456789")
Copy
Returns 1.123457
.
1
todecimal("2ab4.57cd3")
Copy
Returns 24.573
.
1
todecimal("2ab4.57cd3")
Copy
Returns 24.573
.
1
todecimal("1239329332")
Copy
Returns 1.239329e+09
.
1
todecimal("string")
Copy
Returns null
.
Convert a list of strings to a list of decimalsCopy link to clipboard
1
2
3
4
{
todecimal("3.6", "4.2"),
todecimal({"3.6", "4.2"})
}
Copy
Returns {3.6, 4.2, 3.6, 4.2}
. The value can be one or more single values or a list of values.
Feature compatibilityCopy link to clipboard
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 | Compatible | Can be used to create a custom record field that only evaluates at sync time. |
Real-Time Custom Record Fields | Incompatible | Custom record fields that evaluate in real time must be configured using one or more Custom Field functions. |
Process Reports | Compatible | |
Process Events | Compatible | |
Process Autoscaling | Compatible |