Related documents

For the Windows client, Content Manager OnDemand provides menu and toolbar extensions that allow a user to retrieve and view a document related to the document currently being viewed.

This facility is activated by placing information in the Windows system registry. If during initialization, Content Manager OnDemand detects this information, it adds menu items and toolbar buttons. When the user chooses one of these menu items or clicks one of these toolbar buttons, Content Manager OnDemand retrieves the related document and displays it along with the original document.

A typical application for Related Documents is a credit card folder containing monthly statements. The user views a customer’s statement which has a line for each credit card transaction, selects a transaction number on one of these lines, and clicks a toolbar button. Content Manager OnDemand searches an associated transaction folder for the customer’s account number and selected transaction number, then displays the transaction document alongside the statement.

Content Manager OnDemand reads the HKEY_CURRENT_USER\Software\IBM\OnDemand32\Client or HKEY_LOCAL_MACHINE\SOFTWARE\IBM\OnDemand Clients V10.5 key in the Windows system registry for the following keys and string values:
Table 1. Related Documents Keys in the Registry. Value names and Value data for the document keys in the registry.
Key Value Name Value Data
RelatedDocs Related r1[, r2][, r3][, r4][, r5][, r6][, r7][, r8][, r9][, r10]
r1 MenuText menu item text
BitmapDLL toolbar button bitmap DLL path
BitmapResid toolbar button bitmap resource identifier
Folders folder name[\folder name]…
ExcludeFolders folder name[\folder name]…
RelatedFolder related folder name
Fields field information
Arrange V | H| M| C| U

The RelatedDocs key contains one string value. The string name is Related. The value data for the Related string value is a comma separated list of additional Client keys that represent the related documents. Each related document that is specified in the Related string value should be added as a key to the Client key. A maximum of ten related documents can be specified. They can be divided between the HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE keys. The key names can be any string.

The string values are as follows:
MenuText
Specifies the text to appear on the associated menu item under the Content Manager OnDemand Window menu. This value is optional. If not provided, the menu item is blank.
BitmapDLL
Specifies the path for a DLL containing a bitmap resource to be used for a toolbar button to be associated with the Related Documents . The bitmap should be 16 pels wide and 16 pels high.
This value is optional. If not provided, a toolbar button is not created.
BitmapResid
Specifies the resource id of the bitmap within the DLL specified for BitmapDLL. This value is ignored if BitmapDLL is not specified and optional if it is. If not provided, a value of 0 is assumed.
Folders
Specifies one or more names of Content Manager OnDemand folders. If multiple names are provided, they must be separated by a backslash (’\’) character. An asterisk (’*’) can be used as a wildcard character in the last position of the name. This is equivalent to listing all folder names beginning with the characters preceding the asterisk.
The associated menu item, and corresponding toolbar button, is enabled whenever a document is being viewed and the folder associated with the active document is one of the specified folders, or a document is not being viewed and the current folder is one of the specified folders.
This value is optional. If the ExcludeFolders value is provided, this value is ignored. If neither is provided, a folder name test is not performed before enabling the menu item and toolbar button.
ExcludeFolders
Specifies one or more names of Content Manager OnDemand folders. The syntax is the same as the Folders value.
The associated menu item, and corresponding toolbar button, is enabled whenever a document is being viewed and the folder associated with the active document is not one of the specified folders, or a document is not being viewed and the current folder is not one of the specified folders.
This value is optional. If not provided, enablement is controlled by the Folders value.
RelatedFolder
Specifies the name of a Content Manager OnDemand folder which contains a document related to the document being viewed. This folder can be the same as or different from the folder specified by Folders.
Fields
Specifies information describing the document to be retrieved from the related folder. This information is used to perform a search of the folder. The folder fields are first initialized to their default operator and values. The fields specified here are then set to the operator and values requested. The first document in the document list resulting from the search is considered to be the related document.
The information has the following format:
fieldname=operator\value1[\value2]; ... ;fieldname=operator\value1[\value2]
Where:
fieldname
The name of a field defined for the related folder.
operator
The search operator to be used for the field. It must be one of the following values:
EQ
for Equal
NE
for Not Equal
GT
for Greater Than
GE
for Greater Than Or Equal
LT
for Less Than
LE
for Less Than Or Equal
BW
for Between
NB
for Not Between
IN
for In
NI
for Not In
LK
for Like
NL
for Not Like
value1
the first or only value to be used for the field. It can be any string, including an empty string, and can contain the following substitution characters.
%v
If the original folder contains a field of the same name, the value of that field for the original document is substituted in place of these characters; otherwise, an empty string is substituted.
%s
These characters are replaced by any text which the user has currently selected in the original document.
%
These characters are replaced by a single %.
value2
the second value to be used for the field. It is ignored unless the operator is Between or Not Between. The format is the same as value1.
Arrange
specifies the arrangement of the document windows after the related document is brought into view. The value must be one of the following choices:
V
for tiled vertically.
H
for tiled horizontally.
M
for maximized with the related document overlaying the original.
C
for cascaded.
U
for left to the user’s specification in the Maintain Document Arrangement menu item.

The following three screen captures show an example of registry entries required to support two related documents.

Figure 1. RelatedDocs key showing values for two related documents
This diagram illustrates RelatedDocs key showing values for two related documents
Figure 2. Credit key showing values for the first related document
This diagram illustrates Credit key showing values for the first related document
Figure 3. Students key showing values for the second related document
This diagram illustrates Students key showing values for the second related document