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.
||Array||Required. The array and its elements to return as a string.|
||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.
For general information on how to use tasks in Automation Builder, refer to the Tasks section in the Automation Studio documentation.