Skip to end of banner
Go to start of banner

arrayElementExists

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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 !

Availability

This routine is available starting with SIL Engine™ 1.0.

Syntax

arrayElementExists(array, elem)

Description

Returns "true" if the element exists in the array and "false" otherwise.

Alias

elementExists(array, elem)

Parameters

Parameter name

Type

Required

Description

array

array

Yes

Array where the element existence is checked.

element

any

Yes

Element the existence is checked for.

Returns

boolean

Example

if( elementExists(watchers, currentUser()) ){
    print("You are watching this issue.");
}

The routine returns "true" if currentUser is in the watchers array and if the result is "true" a message is printed.

Notes

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

See also

  • No labels