Creating Help for Editing Tables
The View Name in this screen indicates the table to which the help information applies. The Field Name specifies the field within that table. The sequence of items in the Help table is controlled by a key composed of these two fields together with the sequence number. The Sequence Number allows you to create multiple lines of help text for any table field.
If the help entry you are defining is to apply to the entire table rather than a specific field within that table, you should leave the Field Name blank. If the help entry you are defining is to apply to any table containing the specified field name, you should leave the View Name blank. These help entries may be viewed by a user by typing TABLE on the command line and pressing <PF1> for help.
The Indirect Lookup Indicator field allows you to create help message lines that are actually retrieved from another Help table or another Field Name in the current Help table or both.
I
in the Indirect Lookup Indicator field, clear the remaining non-key fields and press <Enter>. This displays the screen shown in Figure 172. The screen contains fields that are used to define an indirect help entry, like Indirect Table, Indirect Key-Table, and Indirect Key-Field.
In the Indirect Table field you must specify the name of the Help table from which the indirect help is to be retrieved. The Indirect Key-Table field allows you to specify the table name, the first key field for the help entry to be retrieved. The Indirect Key-Field allows you to specify the field name, the second key field for the help entry to be retrieved. Indirect help lookup entries can be inserted anywhere in help, but are acted on only once. It is not possible to nest or to create a recursive loop.
The remaining three fields – Displ Attr, Displ Extatt, and Help Data – are those required to display a help message. The display attributes and display extended attributes control the visual presentation of the data on your screen. How these features are used will depend on your installation. The final field will contain the help message itself. This field may contain up to 79 characters of help data. Should you wish to create a help message that is longer than 79 characters you may create multiple entries using the Sequence Number field. Help entries that have identical View name and Field Name will be displayed together in the order specified by the sequence numbers.
Creating Help for menus
Help is available for both menus and tables. When a menu is displayed and help is requested, the help table designated in the Application Control Table is searched. Table 173 shows the two searches that are performed in sequence.
Key 1 |
Key 2 |
---|---|
<menu-ID> |
<Short Description> |
<Short Description> |
When the cursor lies on a menu item and <PF1> is pressed, a search key is created using the menu-ID (in place of the View Name) and the Short Description (in place of the Field Name). If the search is not successful, the menu-ID is made blank and the search is attempted again.
A portion of the Short Description can be entered on the command line, if it follows the keyword MENU, as shown in this example:
MENU,<short description>
If general help is required for the entire menu, only the keyword MENU should be entered on the command line.
Lookup Order for Help Tables
When you are using the Table Editor (whether editing normal Data Tables, editing Views to define tables, or performing a utility function), an additional help table may be specified in the View controlling the edit function. This table is searched by View Name and Field Name. This allows help material to be associated with the data, or even with a particular View of the data.
Help tables of this type are optional. If the View’s Help table field is blank, there is no specific help for this View. When this field is non-blank, the data-specific Help table is searched before the application’s Help table.
The lookup order performed for contextual help for data fields are listed in Table 174.
Help Table Name |
Search Done |
Key 1 |
Key 2 |
---|---|---|---|
From View |
If present |
<view name > |
<field name> |
<field name> |
|||
From ACT |
If above search fails |
<view name> |
<field name> |
<field name> |
The results of the first successful search are given as the response to a user’s help request. If all searches fail, a message is returned.
The first two searches are tried only if the Editor is in use and there is a Help table name in the relevant View. Data-specific help is given precedence over application-specific help.
The second pair of searches is done when the first pair do not apply, or fail. Application help should always be available. Developers may choose to build their own Help tables or to use the tablesONLINE Help table TBOLHELP with or without customization, but a Help table name must be specified in the Application Control Table entries for their applications, and, the named table must exist.
Within each pair, a specific search is tried first, followed by a more general search.This avoids much potential redundancy in help tables. For example, if a Balance field appears in many tables, then one help item keyed by field name alone and found by the second search described above, can provide help for that field in any table. This might be something as simple as a reminder that Balance is a signed number and needs two digits after the decimal. If different help information is needed for the Balance field in certain tables, then more specific entries that will be found by the first search can be constructed.