Array Formatters

Version 24.1.8906

Array Formatters

The following formatters expect an array attribute as input. An array attribute is a single attribute on an item that has multiple values assigned to it. Array attributes in ArcScript are denoted by the pound sign (#) at the end of the attribute (for example tmp.myarrayitem#). See Selecting Attribute Values for more information.


  • The # symbol is not needed when you are passing in the array attribute to any of these formatters.
  • The square brackets around the optional parameters of some formatters are not required. They are there to denote that the parameter is optional.


Returns the index at which the string is found in the attribute array. The index is 1 based.

  • searchstring: The string to search for in the original value.


Returns the number of occurrences in the attribute value of a substring specified by the first parameter.

  • substring: The substring to search for in the attribute value.

endswith(substring[, iftrue][, iffalse])

Determines whether the attribute value ends with the specified parameter. Returns true (or iftrue) if the attribute ends with the value and false (or iffalse) if not.

  • substring: The string expected at the end.
  • iftrue: The optional value returned if the attribute value ends with the parameter value.
  • iffalse: The optional value returned if the attribute value does not end with the parameter value.


Implodes multiple values to a string separated by a separator.

  • separator: The optional separator.


match(pattern[, index][, option])

Searches the string represented by the attribute value for an occurrence of the regular expression supplied in the pattern parameter.

  • pattern: The regular expression pattern to match.
  • index: The optional numbered index of the match to return. The default is 0.
  • option: The optional comma-separated list of regular expression options. Some of the commonly used options are IgnoreCase, Multiline, Singleline, and IgnorePatternWhitespace.


Returns a string with all the values of the attribute concatenated using the specified delimiter.

  • delim: The optional delimiter to separate values with. Default is a comma.