arrayToString

The arrayToString task returns a string representing the contents of a given array. Each array element is separated by a comma in the string representation. The task returns null if the array is empty.

Potential use case

If a recent query into a ticketing database has populated an array with open ticket numbers, you could use this task to convert the array and send an email containing a comma-separated list of those ticket numbers.

Properties

InputTypeDescription
arrArrayRequired. The array and its elements to return as a string.
OutputTypeDescription
arrayStringStringA string representation of the array.

Example

The input variable (arr) is shown in Task History (accessed from Jobs in Operations Manager).

Incoming tab showing the arr variable with its array elements
Task configuration showing the arr input

The return variable shows each element in the array separated by a comma. In this example, no spacer variable was set, so no white space is included.

Outgoing tab showing the array elements as a comma-separated string