Number

Description

Converts a string to a number.

Syntax

Number ( string )

Argument

Description

string

The string you want returned as a number

Returns

A numeric datatype. Returns the contents of string as a number. If string is not a valid number, Number returns 0.

Examples

Example 1

This expression converts the string 24 to a number:

Number("24")

Example 2

This expression for a computed field tests whether the value in the age column is greater than 55 and if so displays N/A; otherwise, it displays the value in age:

If(Number(age) > 55, "N/A", age)

Example 3

This validation rule checks that the number the user entered is between 25,000 and 50,000:

Number(GetText())>25000 AND Number (GetText())<50000