Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

Looking for the documentation on the newest versions of SIL Engine and the Simple Issue Language for Jira 8 for Server/Data Center? Click here !

Info
titleAvailability

This routine is available starting with katl-commons SIL Engine™ 1.0.

Syntax

arrayAddElement(arrayName, elem)

...

addElement(arrayName, elem)

Parameters

Parameter name

Type

Required

Description

arrayName

array

Yes

The array to which

Array the new element is added to.

elem

any

Yes

The element

Element to be added. Must be the same type as the array type.

Return Type

array

Example

Example 1

...

The result returned by the routine is assigned to a new array watchers2, so the initial array watchers watchers  will not be modified.

Example 2

Code Block
watchers = addElement(watchers, currentUser());

The result returned by the routine is assigned to the same array watchers, so the initial array watchers watchers  will be modified.

Note

Note

If elem is not the same type as declared in the array definition, the routine returns error.

Info
titlekatl-commons SIL Engine™ 2.5 specific

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

Filter by label (Content by label)
showLabelsfalse
max100
showSpacefalse
cqllabel = "array_routines"
labelsarray_routines