/
arrayAddElement
arrayAddElement
Description
If elem is an element of the array type, returns a new array that includes the specified element at the end.
Parameters
Return Type
Array
Examples
Example 1
watchers2 = addElement(watchers, currentUser());
The result returned by the routine is assigned to a new array watchers2, so the initial array watchers will not be modified.
Example 2
watchers = addElement(watchers, currentUser());
The result returned by the routine is assigned to the same array watchers, so the initial array watchers will be modified.
If elem is not the same type as declared in the array definition, the routine returns error.
Starting with version 2.5 is easier for you to just use the '+' operator to add elements to an array. array = array + element it is a simple and more meaningful way to express it. array += element is even better.
See also
Peacock
Related content
Array Routines
Array Routines
Read with this
arrayAddElement
arrayAddElement
More like this
Installing Power Scripts™ for Confluence
Installing Power Scripts™ for Confluence
Read with this
arrayAddElement
arrayAddElement
More like this
Simple Issue Language Reference
Simple Issue Language Reference
Read with this
arrayAddElementIfNotExist
arrayAddElementIfNotExist
More like this