• No results found

The Wizard Creation Tool

In document SCT 5.1.0 System Tailoring Volume 3 (Page 109-129)

The Wizard Creation Tool lets implementers and administrators add wizards to modules within ServiceCenter that assist users with certain tasks. For example, using the Wizards Creation Tool you can define a wizard that assists users in adding contacts to a database. The Wizard Creation Tool was used to create several wizards that ship with this release of ServiceCenter.

Accessing the Wizard Creation Tool

The Wizard Creation Tool is found under the Toolkit tab on the system administrator’s main menu.

Creating a Wizard

To create a wizard, open the Wizard Creation Tool and fill in the fields that will define the wizard. Once you have finished defining the wizard, you can call the wizard from any existing format using display options or format control. For more information on the fields, see Field Definitions on page 112.

Each record within a wizard file represents a whole wizard. Define a series of wizards and string them together to present the user with a fully realized, end-to-end wizard.

Change Device Type Step 1

Change Device Type Step 2

Change Device Type Step 3

The Change device type wizard consists of three separate wizard definitions. End users see only one wizard that walks them through changing a device type.

Accessing the Wizard Creation Tool W 111 System Tailoring, Volume 3

Calling a Wizard

The Wizard RAD application is wizard. run, and can be called from:

„ Menus

„ Display Options

„ Format Control

„ States

„ Process Records

Wizards themselves can call Format Control records, Processes or other wizards, as shown below. Wizards do not allow direct calls to RAD applications.

Note: It is possible to send a Wizard into an infinite loop by calling a Process that calls a Wizard that calls the original Process, for example.

ServiceCenter Wizards can call any of the applications shown

Field Definitions

Define wizards using the tabs on the Wizards panel. Each tab controls a different aspect of a Wizard. Not all fields on each tab are required.

Wizard Info Tab

Wizard Name - Enter a brief, descriptive name for the wizard. This field forms the unique key for the wizard in the wizard’s dbdict.

Start Node? - Select this check box if the wizard is the first in a series of wizards.

Brief Description- Enter a brief, meaningful description.

Window Title - Enter text that will display in the title bar of the wizard. This field will also take a message number from the message database. For example, scmsg(1,”am”).

Note: If the wizard you are creating will be localized (translated to another language or languages) then using the scmsg database is the preferred method.

Figure 6-1: The Wizard Info Tab

Field Definitions W 113 System Tailoring, Volume 3

Title - Enter the title of the wizard in this field. This field will also take a message number from the message database. For example, scmsg(1,”am”).

The Title appears on the upper left of the first page of the wizard, in bold.

Prompt - The Prompt field provides instructions for the user and appears in the center of the panel in large type. This field will also take a message number from the message database. For example, scmsg(1,”am”).

Bitmap - Add a bitmap to the left panel of the wizard. The file wizard1.bmp (located in the BITMAPS folder) defaults.

Global Lists - The lists you need to have loaded into memory when the wizard starts.

File Selection Tab

Initial expressions - Enter expressions that will run before the wizard starts.

No $L.file (use typecheck) - If selected, this field initializes a typecheck file which acts as a holding file.

Figure 6-2: The File Selection Tab

$L.file passed in - Selecting this option indicates the $L.file variable will be passed to the wizard from a previous wizard. You must initialize the variable in the Variables tab of the first wizard in the series.

Create a record - Selecting this option indicates the wizard will create a record. You must enter or select the record type in the of type field. This becomes $L.file.

„ of type - Enter the type of record to be created. Click the fill button to select a record from a QBE list. Click the View button to display the dbdict for the record you have selected.

Select records - Select this option to have the user select a record from a list.

„ of type - This field determines the record type for a query, for example Location. Enter the type of record or click the fill button to select a record from a QBE list of all records.

using query - Enter a query, using RAD syntax, to search for records.

Resolve variables - Selecting this box ensures that any variables entered in the Select Records field are evaluated before running the query.

No Records Message - Enter the text to display to the user if no records are returned. This field will also take a message number from the message database. For example, scmsg(42,”am”).

Field Definitions W 115 System Tailoring, Volume 3

Usage Tab

Select one record from list - Selecting this option makes the Selection Criteria options available.

Files under Selection Criteria

Use $L.file as $L.selection - Selecting this options uses the $L.file variable as the selection criteria for a search. The $L.file variable must be initialized on the File Selection tab.

Query for Records - The Query for Records fields can be used in conjunction with one another.

„ of types - This field determines the record type for a query, for example Location. Enter the type of record or click the fill button to select a record from a QBE list of all records.

„ using query - Enter a query, using RAD syntax, to search for records.

„ sort by - Use this field to determine what fields to sort returns by.

If No Records - What to display to the user if no records are available. Select an option from the list.

Figure 6-3: The Usage Tab

„ No Records Message - Enter the text to display to the user if no records are returned. This field will also take a message number from the message database. For example, scmsg(42,”am”).

If One Record - Determines what will happen when only one record is returned. Select the desired behavior from the list.

Allow “Skip” option? - Select this option to allow users to skip a panel.

Request user input - This field indicates that the user will be prompted for information.

Skip Display - Wizard runs without GUI component. This is used when the wizard simply does file manipulation or chaining wizards together.

Sub Format to Display - Enter a subformat name. wizard.subformat defaults.

Display Screen - Enter a display screen, if you want to customize the display options. The default display screen is wizard.display.

Activate “Finish” option? - Selecting this checkbox makes a Finish button appear on the wizard panel. Use this on the final wizard in the series.

Field Definitions W 117 System Tailoring, Volume 3

Actions Tab

Actions define what will happen when a user clicks Next, Cancel or Previous within a wizard, and are defined on the wizard.display Display Options file.

Fields on this tab are executed in order.

Initial Process - The Initial Process is the first process to run when a user performs an action, such as clicking Next.

Perform actions On - The actions defined in the Actions to Perform block will apply to the file or files you select here. Choose either,

„ Current File ($L.file) - performs the defined action on the current file only.

„ Selections ($L. selection) - performs the defined actions on a selected group of records.

Actions to Perform:

„ Expressions - Enter an action using ServiceCenter RAD syntax. The action defined here is applied to the files selected in the Perform Actions On fields.

Figure 6-4: The Actions Tab

Format Control - Enter a format control record or click either the Fill or View button to select a record from a QBE list

„ of type - Select an action from the list that will trigger the format control record.

„ on bad validation - Prompt for an action on bad validation. Return sends the user back to the panel, Continue lets the user continue.

Process name - The wizard you create can run a process after completing.

Enter the process name here, click the fill button to select from a QBE list of available processes.

Replace Current File with Selections? - Checking this replaces the current

$L.file variable with the selection list used by the wizard.

Restart Panel if: - Define the $L.return.action: yes/no/cancel. The parameter chosen indicates whether the user should go on or restart. For example,

$L.return.action="no"

Display Records when complete? - If the user will be creating a record, entering True or an expression that evaluates to True will display the record to the user when the wizard completes.

Mode - This field determines how a record will display to the user if the Display Records when complete? field is selected. Browse defaults.

Field Definitions W 119 System Tailoring, Volume 3

Messaging Tab

Message - Enter a message or message number from the scmsg database that will display when the wizard exits.

Condition - Enter a condition for the message, if desired. For example, not nullsub($L.finish, false)

Type - Select from the list how the message will display to users. The default is On Screen.

Level - Select from the list the level of activity that will be presented to users.

The default level is Info.

Figure 6-5: The Messaging Tab

Variables Tab

Wizard Variables - Use this tab to define variables for use within the wizard.

Variables can be passed to applications or formats being created by the wizard, but must be assigned. For example, a variable such as $L.return.action must be defined here if it will be used within the wizard.

Next Wizard Tab

Figure 6-6: The Variables Tab

Figure 6-7: The Next Wizard Tab

Field Definitions W 121 System Tailoring, Volume 3

Wizard Name - Enter the name of the next wizard in the sequence.

Condition - Enter a condition that determines what happens next based on user input. For example, you could enter the next wizard in sequence and an expression that evaluates to true. Alternately, you could specify different wizards based on user actions or selections.

Comments Tab

Enter any developer comments concerning the wizard here.

Figure 6-8: The Comments Tab

Cancel Expressions Tab

Enter any expressions that will execute on cancel here. This provides the wizard creator an opportunity to clean up variables initialized in the wizard, if desired.

Sample Wizard: Add New Device

The Add New Device wizard is an out-of-box wizard. This is a simple one-panel wizard, which will be used as a sample to explain how a wizard is created.

To view the Add New Device Wizard:

1 From the home menu, select Inventory Management > Assets.

Figure 6-9: The Cancel Expressions Tab

Sample Wizard: Add New Device W 123 System Tailoring, Volume 3 2 Click New.

To view the Add New Wizard information file:

1 From the home menu, select the Toolkit tab > Wizards.

2 In the Wizard Name field, type Add Device. 3 Click Search.

Figure 6-10: The Add New Device wizard

4 Select Add Device from the record list.

The Wizard Info tab details the wizard name, titles, prompts, and the bitmap to be displayed.

This wizard is defined as the “Start Node” since it is the only panel in the wizard. If this wizard had more than one panel, the “Start Node” check box would only be checked on the first panel.

Figure 6-11: The Add Device Wizard Information file

Sample Wizard: Add New Device W 125 System Tailoring, Volume 3 5 Select the File Selection tab.

If the current panel is the first panel, or the Start Node, $L.file is passed in from the user’s original location; in this sample, device.

However, if it's a wizard panel that is called from another wizard panel then the $L.file variable will be passed to the wizard from a previous wizard.

Figure 6-12: Sample wizard File Selection tab

1 Select the Usage tab.

The radio button selected in the Wizard Usage area of the Usage tab indicates that user input is required.

The Sub Format to display is wizard.add.device. This indicates what format will be displayed for the user.

Note: Use Forms Designer to create a form, or use an existing form. Once you have created a form, enter the name of the form in the Sub Format to Display field. For more information on Forms Designer, see System Tailoring, vol.1.

Figure 6-13: Sample wizard Usage tab

Sample Wizard: Add New Device W 127 System Tailoring, Volume 3 2 Select the Actions tab.

When the user presses the Next button, the am.add.device format control is called, and the check.devtype.restrictions process is called.

The “Return” in the on bad validation field indicates that the user will be returned to the wizard if any validations fail.

If the “type in $L.file” is NULL or $L.restricted=true, the user will be returned to the wizard and will not be allowed to continue.

Note: You can use existing Process or Format Control records, or you can create new Process and/or Format Control records. For more

information on Format Control, see System Tailoring, vol. 1. For more information on Process records, see System Tailoring, vol. 2.

Figure 6-14: Sample wizard Actions tab

3 Select the Variables tab.

All local variables ($L.variables) that are referenced anywhere besides the wizard itself must be defined on the Variables tab. Local variables must be defined if they are referenced anywhere in the Process, Sub Format, or Next Wizard forms.

Figure 6-15: Sample wizard Variables tab

Macro Editor W 129

In document SCT 5.1.0 System Tailoring Volume 3 (Page 109-129)