Constants
The following constants are available for your convenience in writing expressions.
Infinity
Function bundle: Core
Represents a value greater than any other number. -Infinity
may also be used as a value smaller than any number.
Example
Calculates the maximum of four field values
PI
Function bundle: Core
The value of a circle's circumference divided by its diameter, approximately 3.14159
.
Example
Returns the area of a circle feature
TextFormatting.BackwardSlash
Function bundle: Core
Inserts a backslash character \
into the text.
Example
Returns '\\serverName\foo\bar'
TextFormatting.DoubleQuote
Function bundle: Core
Inserts a double quote character "
into the text.
Example
Returns 'Nicholas "Nick" Anderson'
TextFormatting.ForwardSlash
Function bundle: Core
Inserts a forward slash character /
into the text.
Example
Returns '151/low'
TextFormatting.NewLine
Function bundle: Core
Inserts a new line, or line break, into the text. Multi-line labels are NOT supported in the ArcGIS API 3.x for JavaScript nor in the ArcGIS Online map viewer.
Example
Returns "T2N R1W"
TextFormatting.SingleQuote
Function bundle: Core
Inserts a single quote character '
into the text.
Example
Returns "Nicholas 'Nick' Anderson"