Task References

On this page:

toString (array)


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.


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.


In the IAP examples shown below:

  • The input variable (arr) is shown in the Task History, which is accessed from Job Manager.


  • 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.


Additional Information

For general information on how to use tasks in Automation Builder, refer to the Tasks section in the Automation Studio documentation.