Sub command

Official Content
This documentation is valid for:

​Allows you to define routines that will be triggered whenever desired. They are defined using "Sub" and "EndSub" and they are called via the Do command. Parameter-passing is not allowed. All variables from the same source program can also be used by the routine (i.e. they are global variables). Also referenced attributes are global within the object scope.

Syntax

Sub 'Subroutine-Name' 
    Code
EndSub

Where:

Subroutine-Name
    Name of the subroutine defined.

Example

...
If &ConfirmedTicket = True
   Do 'PrintTicket'
EndIf
...

Sub 'PrintTicket'
    ... // Corresponding code
EndSub

Scope

Objects Procedure object, Transaction object, Web Panel object, Work Panel objectPanel object, Work With for Smart Devices object
Platforms Web, Win, Smart Devices: Android, iOS, BlackBerry
   

See also

Do command

What is a subroutine?