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 since katl-commons starting with SIL Engine™ 1.0.

Syntax

...

arraySetElement(array, index1, elem)

Description

...

Excerpt

If elem is an element of the array type, returns a new array with the specified element on position index1. If index1 is greater than the array size, it will add empty elements on the missing positions.

Alias

...

setElement(array, index1, elem)

Parameters

...

Parameter name

Type

Required

Description

array

array

Yes

The array

Array where to add the element.

index1

number

Yes

Position where to add the element.

elem

type of array element

Yes

Element to add to the array.

Returns

...

Element of the array type

Example

...

Code Block
watchers = setElement(watchers, 12, currentUser());

Sets the value currentUser for the 13 th element of the array watchers.

Notes

...

Note
  1. If array is not defined as an array, the routine returns error.
  2. If index is not number the routine returns error.
Info
titlekatl-commons SIL Engine™ 2.5 specific

Since Starting with version 2.5 we added the indexing operator. It will work on arrays, strings, dates and interval.It was greatly awaited and it's now there.

You can simply write in your programs watchers[12] = currentUser() to refer to the 13 th element in the watchers array.

 


See

...

also

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