Array - Set
Declaration
<AMARRAY ACTIVITY="set" NAME="text" STARTINDEXZERO="YES/NO"><SETTER INDEX="number" VALUE="text" /></AMARRAY>
Description
Sets the value of one or more elements in an existing array.
Practical usage
Changes the values of existing indexes in an array. Can optionally add additional index/value pairs as well.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Array name | Text | Yes | (Empty) | NAME="Array_Name" | The name of the array to set. The array must be created on a previous step with use of the Array - Create activity. Click the button to populate existing index/value pairs. |
Start index with 0 | Yes/No | No | No | STARTINDEXZERO="YES" | If selected, the index value starts with 0. If disabled, the index value starts with 1. This parameter is disabled by default. |
Index | Number | Yes | (Empty) | INDEX="3" | The name of the index. To add a new index/value pair, click the Click here to add new row box. |
Value | Text | Yes | (Empty | VALUE="theValue" |
The value to set the index to. As with all parameters, this value may be literal or an expression (if surrounded by percent % signs). To add a new index/value pair, click the Click here to add new row box. |
Example
NOTE:
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Description
This sample task creates a 1 x 2 double-dimensioned array.
Copy
<AMARRAY ACTIVITY="set" NAME="text" STARTINDEXZERO="YES"><SETTER INDEX="sampleIndex1" VALUE="text1" /><SETTER INDEX="sampleIndex2" VALUE="text2" /></AMARRAY>