Functions

Top  Previous  Next

Functions are operations that can be executed on a context. For example, the users.admin.deviceservers.dev1 context contains a reboot function that reboots the admin.dev1 Device Server . Every function has an input and output value. Both values are actually Data Tables. Each of these Data Table may have many lines and fields and even contain nested Data Tables in its cells, so the number of possible input and output parameters of a function is virtually unlimited.

note_further-wt

The input and output values of every context function is a Data Table.

Function Definition

Every function is defined using a Function Definition. The Definition contains several options:

Function Name. The name is unique within the context in which the function is defined. This is a string that may contain only letters, numbers and underscore character ("_").
Input Format. Record Format of the Data Table used to specify the input value of the function.
Output Format. Record Format of a Data Table used to output the result of the function.
Description. Description of the function.
Help. Detailed description of the function.
Permissions. Permission level required to access this function.
Group. Shows that function belongs to a function group. Groups help join several similar functions together during different operations.

If a function is unable to finish its job, it will throw an exception containing a a textual description of the problem.

EXAMPLES

The Users context has a function called list ("List Users") that returns a list of all User Accounts on the server that are accessible for the user calling it.

The Scheduled Jobs context has a function called create ("Schedule New Job") that creates a new job with the specified parameters.

note_further-wt

Note that functions are non-interactive in themselves. These are internal server operations - they happen "behind the scenes". To provide input for a function (or to view its output), UI Procedures are used. When a function is used with interactive UI Procedures, it is called an Action.