Category: Special function
This function converts expression to a number.
This is useful when you wish to validate the contents of a field or retrieve the number value of a field.
Argument | Type | Description |
---|---|---|
expression | Number, Text, Boolean | The value or result of an expression to be converted into a number value. |
Return value type: Number
asnumber( '123.45' ) //Returns 123.45
asnumber( 543.21 ) //Returns 543.21
asnumber( 1 > 2 ) //Returns 0 (FALSE result of an expression.)
asnumber( 'text' ) //Returns '#Can't convert to number'