Number
Converts the input parameter into a number value.
This function can be used to replace the TextToNumber modifier as used in CSM.
Syntax
Number(value)
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) | Yes |
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) | Yes |
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 | Yes |
LDAP | Yes |
Mobile | Yes |
Quick Actions (except UI Quick Actions) | Yes |
UI Quick Actions | Yes |
Reports | Yes |
Search/Dashboard without field references | Yes |
Search/Dashboard with field references | No |
Parameter
Parameter | Description |
---|---|
value | The input to evaluate. |
Return Value
Number value. See also Conversion to Number Values.
•If the value parameter is a number, returns the number unchanged.
•If the value parameter is a text value that contains a valid number image, returns the number in the text.
•If the value parameter is a Boolean value and is true, returns 1. If the value parameter is a Boolean value and is false, returns 0 .
•If the value parameter is a currency value, returns the amount.
•If the value parameter is null, returns null.
Example
$(Number("2.793"))
The example above returns 2.793.
$(Number(1234.56HKD))
The above example above returns 1234.56.
$(Number(true))
The above example returns 1.