Defines a function that can be invoked.
A Function statement declares a new function for a transaction. It contains other statements defining actions to be performed by the function. It can only be added under a transaction.
The Functions defined for a transaction can then be called from one or several handlers using Call Function statements (to perform the same actions on several screen classes for example).
Notes:
• A Function statement has its own JavaScript scope, inherited from the transaction’s one.
• The JavaScript variables declared by children statements such as Get nodes or Get text are local in the function’s scope. They exist while the Function is executing.
• The children statements can access the global variables of the transaction’s scope as the local variables of the function’s scope.
Property | Type | Category | Description |
---|---|---|---|
Comment | String | standard | Describes the object comment to include in the documentation report. This property generally contains an explanation about the object. |
Is active | boolean | standard | Defines whether the statement is active. |