/
setElement
setElement
Function: setElement()
Sets the value of an item at a specified index position within an array.
Syntax
- setElement(array, item, value)
Argument | Type | Description |
---|---|---|
array | Array or Recordset | The array or recordset to evaluate |
item | Integer | The position of the item in array to be returned. |
value | Integer | The value the item in array will be set to. |
If item is not a valid entry, this function will cause the script to generate and error and stop processing.
Examples
setElement(["Red", "Green", "Blue"], 2, "Red")
Sets the 2nd element of the array, "Green", to be "Red", i.e.
["Red", "Red", "Blue"]
Please note that setElement() cannot be used on recordsets, only arrays.
See Also
Related content
Expression Basics
Expression Basics
Read with this
setElement
setElement
More like this
popElement
popElement
Read with this
setElement
setElement
More like this
setElement
setElement
More like this
setElement
setElement
More like this