toString (array)

Prev Next

Task Purpose

The toString (array) task is used to return a string representing the contents of a given array. The string representation contains each array element separated by a comma. The task returns null if the array is empty.

Potential Use Case

This task returns a string with all the array values, separated by commas. If a recent query into a ticketing database has populated an array with open ticket numbers, you could use this method to convert the array and send an email that contains a comma separated list of those ticket numbers.

Parameters

Input and output parameters are shown below.

Input Type Description
arr Array Required. The array and its elements to return as a string.

 

Output Type Description
arrayString String A string representation of the array.

Example

In the example below, the input variable (arr) is shown in the Task History, which is accessed from Jobs in Operations Manager.

toString-01

 

toString-02

The return variable shows each element in the array separated by a comma. In this example, no white space is used since we did not set a spacer variable.

toString-02