Functions for formatting text values. These are commonly used in the labeling and popup profiles.
Concatenate
Concatenate(values?, separator?, format?) -> Text
Function bundle: Core
Concatenates values together and returns a text value.
Parameters
- values (Optional): Array<Text> - An array of text values to concatenate.
- separator (Optional): Text - Separator to use for concatenation if
values
parameter is an array. Or text to concatenate, if a single value is provided for the first parameter. If not provided will be empty. - format (Optional): Text - Special formatting characters for dates or numbers. This parameter is available in Arcade version 1.3 and later.
Possible values:0
: Digit#
: Digit, omitting leading/trailing zerosD
: Day of the month, not padded (1 - 31)DD
: Day of the month, padded (01 - 31)DDD
: Ordinal day of the year (1 - 365)d
: Day of the week (1 - 7)ddd
: Abbreviated day of the week (e.g. Mon)dddd
: Full day of the week (e.g. Monday)M
: Month number (1 - 12)MM
: Month number, padded (01 - 12)MMM
: Abbreviated month name (e.g. Jan)MMMM
: Full month name (e.g. January)Y
: Full yearYY
: Two-digit yearh
: Civilian hours, not padded (0 - 12)hh
: Civilian hours, padded (00 - 12)H
: Military hours, not padded (0 - 24)HH
: Military hours, padded (00 - 24)m
: Minutes, not padded (0 - 59)mm
: Minutes, padded (00 - 59)s
: Seconds, not padded (0 - 59)ss
: Seconds, padded (00 - 59)SSS
: Milliseconds, padded (000 - 999)A
: AM/PMZ
: Time zone offset in narrow hours +/- UTC (e.g.-7
or+11
)ZZ
: Time zone offset in hours +/- UTC (e.g.-07:00
or+11:00
)ZZZ
: Time zone offset in compact hours +/- UTC (e.g.-0700
or+1100
)ZZZZ
: Abbreviated named time zone (e.g.EST
)ZZZZZ
: Named time zone (e.g.Eastern Standard Time
)
Return value: Text
Example
prints 'red/blue/green'
Concatenate(['red', 'blue', 'green'], '/')
Count
Count(value) -> Number
Function bundle: Core
Returns the number of characters in a text value.
Parameter
- value: Text - A text value on which to perform the operation.
Return value: Number
Example
Returns 13
Count('Graham County')
Find
Find(searchText, targetText, startPosition?) -> Number
Function bundle: Core
Finds a sequence of characters within a text value. Wildcards are NOT supported. A returned value of -1
indicates no results were found.
Parameters
- searchText: Text - The text to search for.
- targetText: Text - The text to search.
- startPosition (Optional): Number - The zero-based index of the character in the text to search from.
Return value: Number
Example
prints 6
Find('380', 'Esri, 380 New York Street', 0)
FromCharCode
FromCharCode(charCode1, [charCode2, ..., charCodeN]?) -> Text
Function bundle: Core
Returns a text value created from a sequence of UTF-16 character codes.
Parameters
- charCode1: Number - A number representing UTF-16 code units. Each unit has a range of 0-65535.
- [charCode2, ..., charCodeN] (Optional): Number - A sequence of numbers representing UTF-16 code units. Each unit has a range of 0-65535.
Return value: Text
Examples
The following example returns 'XYZ'
FromCharCode(88,89,90)
// returns 'XYZ'
The following example returns '🌉'
FromCharCode(55356, 57097)
// returns '