Follow-On Topics

Related Topics

# About King Task Centre Functions

Functions are created in VBScript and used extensively throughout King Task Centre. They are dragged and dropped into fields within the step configuration or dropped directly into the task script where required.

A list of parameters used by the function may be added. The order in which the parameters are displayed is the order in which they are added into the VBScript in the Script tab and therefore the order in which they are processed.

Two types of function may be created, depending on user permissions and the intended use of the function:

About Global Functions

If a function is required by several different tasks, then a user with either Function Administrator or System Administrator rights may create a global function through the main interface. Once created, the global function is then available for selection by any user through the Task Browser dialog.

In addition, global functions may be exported to or imported from another file location so that they may be shared across different King Task Centre implementations.

About Task Functions

If a function is required for a specific task only, then any user can create a task function through the Task Browser dialog. Once created, the function is available for the steps in that task only. In addition, all functions associated with a specific task are pre-selected for inclusion in the export file (`.TKS`) when exporting a task to another file location so that they may be shared across different King Task Centre implementations.

Function Properties Dialog

The Function Properties dialog box contains three tabbed panes listed below through which a Global or Task Function may be created and configured.

The following methods may be used to open the Function Properties dialog box:

|  | Right-click on the Functions node in the Task Manager and select the Add Function option from the drop down menu.

|  | Double-click on an existing Function displayed in the Items List.

|  | Right-click in a clear area within the Items List and select the Add Function option from the drop down menu.

|  | In the Environment tab of the Task Browser dialog box, select the Task option from the Scope drop down list. Then right-click on the Functions node and select the New menu option.

|  | In the Environment tab of the Task Browser dialog box, select the Task option from the Scope drop down list. Then right-click on an existing Function and select the Edit menu option.

|  | In the Environment tab of the Task Browser dialog box, select the Task option from the Scope drop down list. Then double-click on an existing Function.

General

The General tab is used to enter the following properties for a Function:
|  | Name — A name for the new Function
|  | Description — A description for the Function
| Click the image to view full size.

Parameters

The Parameters tab contains the following:
|  | Parameters — A list of parameters used by the function. The order in which they are displayed is the order in which they are processed; and therefore added into the VBScript in the Script tab.
| Click the image to view full size.

Script

The Script tab contains the following for creating a new Function:
|  | Scripting — A free text box into which the Function script may be manually entered. Other Formulas, Functions, Step Properties, Variables and Task Properties may be dragged and dropped into the script from the Task Browser as required.
|  | Validation — Displays the results of the script validation process.
|  | Check Syntax — Checks the syntax of the script entered into the Scripting text box and displays the results in the Validation text box.
| Click the image to view full size.

Copyright © 2018 Quadrant Software B.V. All rights reserved.