Follow-On Topics

Related Topics

# About King Task Centre Variables

Variables are created and used extensively throughout King Task Centre and can either have fixed values or values that are dynamically populated when a task is run.

Two classes of variable can be created:

About Global Variables

Global variables are available for all tasks residing in this King Task Centre installation to use.

They are created in the King Task Centre client (see Using the King Task Centre User Interface). Only users with System Administrator, or Variable Administrator rights can create global variables. Once created, the global variable can be selected by any user through the Task Browser dialog.

To open the variable Properties dialog, do the following:

1. From the Task Manager, go to King Task Centre > System > Variables.
2. Either:
   - Right-click on Variable and select Add Variable.
   - Right-click in Items List and select Add Variable.

A global variable can be saved as a Variant, Password, or Datafile type. Options are available for encryption and for population by an array.

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

Task Variables

If a variable is required for a specific task only, then any user can create a task variable through the Task Browser dialog.

To open the variable Properties dialog, from the Task Browser (you'll need to have a task open first), do the following:

|  | In the Environment tab of the Task Browser, change Scope to say Task, then right-click on the Variables node and select New

Task variables can be saved as a Variant, Password, or Datafile type. Options are available for encryption and for population by an array. In addition, a task variable may be saved as a Parameter type, meaning that it is exposed within the Email Trigger (SMTP) and Microsoft SQL Server Trigger tools to be dynamically populated from an email parameter or database column when the task is run.

Further options enable the variable to be used for a single instance, or all currently running instances of the task when its value is being populated dynamically.

In addition, all variables associated with a specific task are pre-selected for inclusion in the export file (`.TSK`) when exporting a task to another file location, so that they can be shared across different King Task Centre implementations.

Variable Properties Dialog Box
General

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

Details

The Details tab contains the following:
|  | Type — The following variable types can be created:
|  | Variant — Used to store text data.
|  | Password — Not just used for storing and encrypting actual passwords, a Password variable can be used to store sensitive data — contents are automatically encrypted in the VBScript of the task/
|  | Datafile — Used to store files, for example, to store email attachments from an Email Trigger (SMTP) task step.
The above variables types can be further "locked down" by:
|  | Parameter — Any task data can be mapped to a Parameter variable to make it available for use by other tasks or task steps.
| Click the image to view full size.

For example, in the About the Email Trigger (SMTP) Tool tool use it to map email properties, in the About the Microsoft SQL Server Trigger Tool tool use it to map database columns, or in the File System Event tool to map file details for later use.

Use Parameter Attributes to specify the type of Parameter variable:

Parameter Attribute | Description
--- | ---
In | An input parameter, the variable can consume any task data and make it available for other task steps
Out | An output parameter, the variable does not consume any data, and can only pass the (static) value set in Default Value (see below).
In, Out | The variable is both an input and an output type — A Default Value can be set, but this can change based on any data passed to it.

|  | Encrypted — The variable value is encrypted in the VBScript; this is automatically selected for Password variables.

|  | Array — At the time of writing, this is a dynamic array variable type used to capture multiple attachments from inbound SMTP emails. It is best used with the Datafile variable Type.

|  | Scope — Specify how long the variable keeps the current value:

|  | Task — The variable value persists across multiple task runs. If the value is dynamically updated at runtime, then that value is used by all currently running instances of the task. Alternatively, you can set or reset the variable value by entering it in New Value underneath.

|  | Task Instance — The variable value only persists for that specific task run. If the value is dynamically updated at runtime, that value is only used by that single task instance. Use Default Value to set the "starting" value of the variable at the beginning of each task run.

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