set

Inserts an element at the specified index position, replacing the existing element.

Syntax:

$[ScriptVariable]::set(int index, String str)

Parameters:

Example:

The following example illustrates the syntax for the replace list method (using the $recipients list variable created in the add example):

$recipients::set(1, "Building 12")

print($recipients)

Input:

['Engineering Group']['Building Twelve']['Winston Smythe']

Output:

['Engineering Group']['Building 12']['Winston Smythe']