INFOIMAGE DESKTOP MANAGER

Similar documents
Unisys INFOIMAGE FOLDER ON WINDOWS NT. Form User Exits Guide

TCP/IP Application Services (TAS) Mail Processor

IPS Remote Site Facility Module (VS 345-REM)

Distributed Data Processing (DDP-PPC) OSI Interface C Language

Enterprise Output Manager. UCopyIt Guide UNISYS. ' 2017 Unisys Corporation. All rights reserved. Release 3.4a. Printed in USA.

unisys Product Documentation Library CDLib Manager User s Guide Release Level April

unisys Agile Business Suite How to Install Visual Studio 2013 for AB Suite 5.0 Applies to: Developer 5.0

UNISYS. Unisys Check Processing Enterprise Solutions. IPS/ICPS Software-Based CAR/LAR Release Notes. Release 4.0.0

Enterprise Output Manager

Distributed Data Processing (DDP-PPC) DCA Interface C Language

SECURE FILE TRANSFER PROTOCOL. EventTracker v8.x and above

unisys Unisys Stealth(cloud) for Amazon Web Services Deployment Guide Release 2.0 May

Dump and Load Utility User s Guide

Data Management System (DMS 2200) FORTRAN Data Manipulation Language (FDML)

Integrate Veeam Backup and Replication. EventTracker v9.x and above

Louisiana Medicaid Management Information System (LMMIS)

Louisiana Medicaid Management Information System (LMMIS)

Schema Inspector Utility User s Guide V E R S I O N Copyright 2016 Jade Software Corporation Limited. All rights reserved.

Programmer s Reference

unisys Internet Commerce Enabler Technical Overview imagine it. done. Release 11.1 October

SVA NMP Monitor for Unicenter TNG on Windows NT/2000

Agilent OpenLAB Chromatography Data System (CDS)

Louisiana Medicaid Management Information System (LMMIS)

Microscan Barcode Reader

The information contained herein is subject to change without notice. Revisions may be issued to advise of such changes and/or additions.

ACTIVANT. Prophet 21 ACTIVANT PROPHET 21. New Features Guide Version 11.0 ADMINISTRATION NEW FEATURES GUIDE (SS, SA, PS) Pre-Release Documentation

unisys Enterprise Database Server for ClearPath MCP Transaction Processing System (TPS) Programming Guide imagine it. done. ClearPath MCP 13.

Schema Inspector Utility User's Guide VERSION Copyright 2015 Jade Software Corporation Limited. All rights reserved.

Agilent ChemStation Plus

Image Check Processing System (ICPS) Graphical Work Flow Monitor

Code Coverage White Paper VERSION Copyright 2018 Jade Software Corporation Limited. All rights reserved.

Louisiana Medicaid Management Information System (LMMIS)

Visual Programming 1. What is Visual Basic? 2. What are different Editions available in VB? 3. List the various features of VB

GV 2 Devicemanagement 2

unisys Enterprise Database Server for ClearPath MCP Application Program Interfaces Programming Guide imagine it. done. ClearPath MCP 13.

Capital. Capital Logic Generative. v Student Workbook

Louisiana Medicaid Management Information System (LMMIS)

Oracle IVR Integrator

Quick Update Guide for ComplianceOne Client

Code Coverage. Copyright 2009 JADE Software Corporation Limited. All rights reserved.

Installation, Configuration, and Operations Guide

Integrate Microsoft ATP. EventTracker v8.x and above

Integrate Palo Alto Traps. EventTracker v8.x and above

Microsoft Dynamics GP. Extender User s Guide

Capital. Capital Logic Aero. v Student Workbook

unisys ClearPath Enterprise Servers Remote Database Backup Planning and Operations Guide ClearPath MCP 18.0 April

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

SAS Factory Miner 14.2: User s Guide

Language Localization Guide. version v12.15

Administration. STILOG IST, all rights reserved

HYPERION SYSTEM 9 BI+ ANALYTIC SERVICES RELEASE 9.2 ANALYTIC SQL INTERFACE GUIDE

AUTOMATED APPOINTMENT REMINDER AND ANNOUNCEMENT SYSTEM

IBM TRIRIGA Application Platform Version 3 Release 4.2. Object Migration User Guide

Single Point Operations

BenchCel Workstations Software

Capital. Capital Logic Interactive. v Student Workbook

Agilent MassHunter Metabolite ID Software. Installation and Getting Started Guide

Geomagic Design. What s New. Get to Market Faster with Better Products at a Lower Cost. V16 Hotfix. Lista Studio srl,

Partner Information. Integration Overview Authentication Methods Supported

User Guide. Datgel. Photo Tool gint Add-In 3

Solar Eclipse Scheduler. Release 9.0

Oracle Hospitality Simphony Cloud Services Post-Installation or Upgrade Guide Release 2.10 E July 2018

Modeling Network Integrity Release 7.3.1

Microsoft Dynamics GP. Extender User s Guide Release 9.0

Chapter 2 Autodesk Asset Locator... 3

Port Configuration. Configure Port of EventTracker Website

Oracle Financial Services Regulatory Reporting for European Banking Authority (OFS AGILE RP EBA)

CAMPAGNE. Fundraising software solutions

Agilent 34826A BenchLink Data Logger for 34980A. Getting Started Guide. Agilent Technologies

BEA WebLogic. Integration. Best Practices in Designing BPM Workflows

Integrate EMC Isilon. EventTracker v8.x and above

Accountants. Enterprise. Installation Guide. Administration Centre. Version 3.0

1.0. Quest Enterprise Reporter Discovery Manager USER GUIDE

Integrate Sophos UTM EventTracker v7.x

Louisiana Medicaid Management Information System (LMMIS)

Cisco TEO Adapter Guide for SAP ABAP

OpEasy Advanced Provisioning User Guide Release

Oracle Hospitality Cruise Shipboard Property Management System Fargo HDP5000 Printer Installation Guide Release 8.0 E

8815 Centre Park Drive Columbia MD Publication Date: Dec 04, 2014

Avaya Conference Viewer Release 5.0 User Guide

Security Explorer 9.1. User Guide

Integrate Bluecoat Content Analysis. EventTracker v9.x and above

Product Terms and Conditions - Hosted Exchange

Insbridge Enterprise Rating RateManager User Guide

Basic Programming Reference Manual

Installation & Set-Up Guide (For PFW users)

Louisiana Medicaid Management Information System (LMMIS)

Ascent 6.1 Release Script for FileNet Content Manager 3.0. Release Notes

Oracle Cloud. Using Oracle Social Network Release E

Visitor Management Host User Guide

Oracle Hospitality Suite8 Export to Outlook User Manual Release 8.9. July 2015

VISUAL BASIC 6.0 OVERVIEW

G5584A Labware MiniHub

CA Output Management Web Viewer

Embarcadero All-Access Server Installation Guide

Integrate Dell FORCE10 Switch

RapidWorks. What s New for 32-bit and 64-bit versions Build Version March 31, 2014

Louisiana Medicaid Management Information System (LMMIS)

Jonas Activity Management Technical Deployment Guide

Installing Enterprise Switch Manager

Transcription:

INFOIMAGE DESKTOP MANAGER Indexing User Exits Reference Manual Copyright 1999 Unisys Corporation. All rights reserved. Unisys is a registered trademark of Unisys Corporation. June 1999 Printed in USA 000000

The names, places, and/or events used in this publication are not intended to correspond to any individual, group, or association existing, living, or otherwise. Any similarity or likeness of the names, places, and/or events with the names of any individual, living or otherwise, or that of any group or association is purely coincidental and unintentional. NO WARRANTIES OF ANY NATURE ARE EXTENDED BY THIS DOCUMENT. Any product or related information described herein is only furnished pursuant and subject to the terms and conditions of a duly executed agreement to purchase or lease equipment or to license software. The only warranties made by Unisys, if any, with respect to the products described in this document are set forth in such agreement. Unisys cannot accept any financial or other responsibility that may be the result of your use of the information in this document or software material, including direct, special, or consequential damages. You should be very careful to ensure that the use of this information and/or software material complies with the laws, rules, and regulations of the jurisdictions with respect to which it is used. The information contained herein is subject to change without notice. Revisions may be issued to advise of such changes and/or additions. RESTRICTED Use, reproduction, or disclosure is restricted by DFARS 252.227 7013 and 252.211 7015/FAR 52.227 14 & 52.227-19 for commercial computer software. Correspondence regarding this publication should be forwarded to Unisys Corporation by addressing remarks to Product Information, Unisys Corporation, Suite C, 10430 Harris Oaks Blvd, Charlotte, NC 28269-7512 U.S.A. Comments about documentation can also be sent through e-mail to doc@unisys.com. Unisys is a registered trademark of Unisys Corporation. All other terms mentioned in this document that are known to be trademarks or service marks have been appropriately capitalized. Unisys Corporation cannot attest to the accuracy of this information. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark.

Contents About This Document... vii Section 1. Introduction to the DTM Indexing User Exits Capabilities... 1 1 Triggering Activities... 1 1 Functions That You Can Perform... 1 2 Functions Available from Desktop Manager... 1 2 About the Sample Source Code... 1 3 Section 2. The DTM Index Form Properties... 2 1 Events... 2 1 Functions... 2 2 Event: CharCheck_Event... 2 3 Syntax... 2 3 Comments... 2 3 Return Codes... 2 3 Example... 2 3 Event: FieldExit_Event... 2 4 Syntax... 2 4 Comments... 2 4 Return Codes... 2 4 Example... 2 4 Event: FormClose_Event... 2 5 Syntax... 2 5 Comments... 2 5 Example... 2 5 Event: FormLoad_Event... 2 6 Syntax... 2 6 Comments... 2 6 Example... 2 6 Event: MenuItem_Click_Event... 2 7 Syntax... 2 7 Comments... 2 7 Example... 2 7 Function: GetFieldDefaultValue... 2 8 Syntax... 2 8 Returns... 2 8 Comments... 2 8 000000 Unisys Corporation June 1999 iii

Contents Example... 2 8 Function: GetFieldValue... 2 9 Syntax... 2 9 Returns... 2 9 Comments... 2 9 Example... 2 9 Function: GoToField... 2 10 Syntax... 2 10 Comments... 2 10 Example... 2 10 Function: MenuItemAdd... 2 11 Syntax... 2 11 Comments... 2 11 Example... 2 11 Function: MenuItemDisable... 2 12 Syntax... 2 12 Comments... 2 12 Example... 2 12 Function: MenuItemEnable... 2 13 Syntax... 2 13 Comments... 2 13 Example... 2 13 Function: SetFieldCheckType... 2 14 Syntax... 2 14 Comments... 2 14 Example... 2 14 Function: SetFieldRange... 2 15 Syntax... 2 15 Comments... 2 15 Example... 2 15 Function: SetFieldValue... 2 16 Syntax... 2 16 Comments... 2 16 Example... 2 16 Function: SetMenuCaption... 2 17 Syntax... 2 17 Comments... 2 17 Example... 2 17 Function: WarningMessage... 2 18 Syntax... 2 18 Comments... 2 18 Example... 2 18 Section 3. Developing User Exits for the DTM Index Form Software Components... 3 1 User Exit Architecture... 3 1 Version Compatibility... 3 1 Sample User Exit Code... 3 1 Sample Steps to Implement a DTM Index Form User Exit... 3 2 Registering Your New User Exit... 3 3 iv Unisys Corporation June 1999 000000

Contents Handling Multiple Document Classes... 3 3 Section 4. The Customized Index Form Properties... 4 1 Events... 4 1 Functions... 4 2 Event: FormLoad_Event... 4 3 Syntax... 4 3 Comments... 4 3 Example... 4 4 Event: FormShow_Event... 4 5 Syntax... 4 5 Comments... 4 5 Example... 4 5 Event: FormUnload_Event... 4 6 Syntax... 4 6 Comments... 4 6 Example... 4 6 Function: GetFieldDefaultValue... 4 7 Syntax... 4 7 Returns... 4 7 Comments... 4 7 Example... 4 7 Function: GetFieldFlags... 4 8 Syntax... 4 8 Returns... 4 8 FieldFlags Enumeration... 4 8 Example... 4 9 Function: GetFieldStatus... 4 10 Syntax... 4 10 Returns... 4 10 FieldStatus Enumeration... 4 10 Example... 4 10 Function: GetFieldValue... 4 11 Syntax... 4 11 Returns... 4 11 Comments... 4 11 Example... 4 11 Function: SetFieldValue... 4 12 Syntax... 4 12 Comments... 4 12 Example... 4 12 Function: NotifyClient... 4 13 Syntax... 4 13 Comments... 4 13 Example... 4 13 Section 5. Developing Visual Basic Index Forms 000000 Unisys Corporation June 1999 v

Contents Software Components... 5 1 User Exit Architecture... 5 1 Version Compatibility... 5 1 Sample User Exit Code... 5 2 Sample Steps to Implement an Index Form User Exit... 5 2 Registering Your New User Exit... 5 3 Handling Multiple Document Classes... 5 3 vi Unisys Corporation June 1999 000000

About This Document Purpose Scope Audience This document describes the architecture and use of User Exits. With this information a programmer can design and write User Exit programs using the function set provided. The data structures and functions of the programming interface are described along with sample program snippets, and error codes. The prerequisite information for developing Windows programs, and coding various languages is beyond the scope of this document. The primary audiences for this document are those personnel responsible for designing, developing, and implementing DTM user exits. Prerequisites An understanding of the design philosophy of the system as a whole, its operating principle, and capabilities that would otherwise be accessed through the user interface Visual Basic 5.0 ActiveX DLL programming expertise. Visual Basic 5.0 and at least Service Pack 2 installed. 000000 Unisys Corporation June 1999 vii

About This Document viii Unisys Corporation June 1999 000000

Section 1 Introduction to the DTM Indexing User Exits User Exits are customer-written program functions that enable customized capabilities to be added to the Desktop Manager (DTM) Indexing function. With your own functions you might perform special look-up or validation processes or write processes that work in conjunction with existing form functions. Desktop Manager has two types of indexing user exits. The DTM Index Form user exit and the Customized Index Form user exit. The DTM Index Form user exit is activated when DTM displays its standard index form. The Customized Index Form user exit displays an index form created by a programmer. DTM notifies the user exit when to display the custom-written index form. Both types of user exits can be used but not on the same document class. If you create a customized index form for one document class the other document classes can still utilize the DTM index form. Capabilities User exits are custom-written functions that provide additional processing for designated index forms or individual fields on a form. Using your own code, and by making calls to several functions built into the user exit skeleton, you can perform specialized processing required in your specific workplace. For instance, you might enable your data entry staff to enter abbreviations and have a user exit spell out the full text. Triggering Activities You can create user exits that run after any of these user actions: DTM Index Form: When a form is opened After a keystroke is entered into a field When a field is implicitly completed by tabbing to another field or closing the form When a form is closed When a custom menu is selected from the Index form menu bar 000000 Unisys Corporation June 1999 1 1

Introduction to the DTM Indexing User Exits Customized Index Form: When the user wants to display the index form When the index form must be closed Functions That You Can Perform DTM Index Form: For the DTM indexing user exit there is one user exit module (ActiveX DLL) for each document class Index form created with the InfoImage Forms Creator. Within a user exit routine, you can include programming functionality that your environment supports, but you should avoid time consuming processes. For instance, you might look up values on an external database or perform mathematical calculations. The triggering mechanisms mentioned above specifically help to perform the following types of activities: Provide special default values upon opening the form Verify or manipulate each keystroke as you type it into the field Verify or manipulate field values once you have typed them Perform validation of fields upon closing the form Display custom menu items on the index form upon opening the form Perform special processes when a custom menu item is selected Customized Index Form: For the Customized Index form there is one user exit module (ActiveX DLL) for all document classes for which you create your own Visual Basic forms. Your can create as many Visual Basic forms as necessary. Typically, there is one Visual Basic form for each document class. These Visual Basic forms are part of the user exit module. Within the customized index form user exit, you can include programming functionality that your environment supports and is supported in a Visual Basic ActiveX DLL. For example, on your Visual Basic form you can include any OCX control that you require. Functions Available from Desktop Manager DTM Index Form: In creating your routines, you can call functions that already exist within the DTM Indexing user exit to do the following; Access all field data in the DTM Indexing form; including defaults Read or change and field value 1 2 Unisys Corporation June 1999 000000

Introduction to the DTM Indexing User Exits Temporarily change the value range for a field Update all field values Display messages to the user Customized Index Form: In creating your routines, you can call functions that already exist with the Customized Index form user exit to do the following; Access all field values for a document or folder Identify to DTM which fields to update About the Sample Source Code Included on the install CDROM is sample source code for each type of user exit. To compile your own user exits, to modify and recompile the skeleton source code you need the Microsoft Visual Basic 5.0 Professional Edition or Enterprise Edition and all service packs. 000000 Unisys Corporation June 1999 1 3

Introduction to the DTM Indexing User Exits 1 4 Unisys Corporation June 1999 000000

Section 2 The DTM Index Form Properties The DTM Index Form User Exit allows you to add validation to the indexing process when using the standard DTM Indexing Form. The DTM Index Form User Exit uses properties, events and functions. The following table describes the Index Form User Exit Properties: Events Property Type Description Object_Class String Identifies the document class of the workitem currently being indexed. Object_ID String Identifies the ID of the workitem currently being indexed. Object_Name String Identifies the external name of the workitem currently being indexed. Object_Type String Identifies the type of the workitem currently being indexed. The following table describes the Index Form User Exit Events: Event Parameters Description CharCheck FieldExit FormClose FieldName As String, FieldValue As String, NewChar As String FieldName As String, FieldValue As String Cancel As Boolean, SaveOption As Boolean DTM activates this event when the user enters a keystroke and the field was identified to have each character checked as it is entered. DTM activates this event when the user exits a field and the field was identified to have a field check performed on it. DTM activates this event when the index form is about to close. FormLoad Cancel As Boolean DTM activates this event whenever the index form is loaded. MenuItem_Cli ck MenuID As String DTM activates this event when the user clicks on a user exit menu. 000000 Unisys Corporation June 1999 2 1

The DTM Index Form Functions The following table describes the Index Form User Exit Functions: Function Parameters Description GetFieldDefaultValue FieldName As String Returns the default value for a field. GetFieldValue FieldName As String Returns the current value for a field. GoToField FieldName Sets the field to where the cursor will move next. MenuItemAdd MenuID As String, MenuCaption As String) Creates a menu item on the index form. MenuItemDisable MenuID As String Gray-out a menu item. MenuItemEnable MenuID As String Allow a menu item to be selected. SetFieldCheckType SetFieldRange SetFieldValue FieldName As String, CheckType As FieldCheckType FieldName As String, LowValue As String, HighValue As String FieldName As String, Value As String Set the type of check to perform on a field Changes the High and Low ranges for a field. Changes the value for a field. SetMenuCaption MenuCaption As String Set the name of the user exit menu in the Index form Menu bar. WarningMessage Message As String Sets a message to display to the user. 2 2 Unisys Corporation June 1999 000000

The DTM Index Form Event: CharCheck_Event Syntax CharCheck_Event (FieldName As String, FieldValue As String, NewChar As String) As CharCheck_Int Parameter FileName FieldValue NewChar Description Contains the name of the field to validate. Contains the FieldValue before the new character was entered. Contains the new character to validate. Comments DTM activates this event when the user enters a keystroke and the field was identified to have each character checked as it is entered. To identify a field to use character checking call the SetFieldCheckType function in the FormLoad_Event for each field you wish to validate. To change the character entered to a different character, set NewChar equal to the desired character. Return Codes Example CHAR_NOTTESTED - character was not tested CHAR_ACCEPTED - character is valid CHAR_REJECTED - character is not-valid CHAR_REPLACE - replace the character with something else (Set NewChar = <replacement character>) 000000 Unisys Corporation June 1999 2 3

The DTM Index Form Event: FieldExit_Event Syntax FieldExit_Event(FieldName As String, FieldValue As String As FieldExit_Int Parameter FileName FieldValue Description Contains the name of the field to validate Contains the data to validate. Comments Return Codes Example DTM activates this event when a field is exited and the field was identified to have a field exit check performed on it. To identify a field to use Field checking, call the SetFieldCheckType function for each field you wish to validate in the FormLoad_Event. FIELD_OK - Validation was successful FIELD_ERROR - Validation failed This example validates FIELD1 and FIELD2. FIELD1 is validated for a 1 or 2. FIELD2 is used along with FIELD3 to set FIELD4. 2 4 Unisys Corporation June 1999 000000

The DTM Index Form Event: FormClose_Event Syntax Sub FormClose_Event(Cancel As Boolean, ByVal SaveOption As Boolean) Parameter Cancel SaveOption Description Flag that determines whether the user exit will allow the form to be closed. Flag that identifies whether the chose to save changes. Comments This function is activated when the index form is being closed. Example This example validates FIELD1 for XXXX. When XXXX is found in FIELD1 the form will not be closed and a warning message is displayed. 000000 Unisys Corporation June 1999 2 5

The DTM Index Form Event: FormLoad_Event Syntax Sub FormLoad_Event(Cancel As Boolean) Parameter Cancel Description Flag that determines whether this user exit will handle the index form for this document class. If you do not want to process this Object and want the DTM to display the DTM index form set Cancel to True. Comments Add code to this event to use GetFieldValue to get the current values of each index field or use the FormField collection to enumerate through the index fields. Use the SetFieldValue function to update the fields that you wish to be changed. Example This example set the type of check for FIELD1 to be field exit and FIELD5 to be character checking. It sets the default values for FIELD2 and FIELD6. It also adds two menu items to the DTM Index form, Send and Receive. 2 6 Unisys Corporation June 1999 000000

The DTM Index Form Event: MenuItem_Click_Event Syntax Sub MenuItem_Click_Event(MenuID As String) Parameter MenuID Description Text string of an ID assigned to a menu item. Comments This function is activated when a user exit menu item is clicked on. You must add menu items by calling the MenuItemAdd function for each menu item you wish to create. Do this in the FormLoad_Event. This function is purely to trigger the user exit to perform a customized function. Also See; MenuItemEnable and MenuItemDisable. Example This example toggles the menu items from enabled to disabled. 000000 Unisys Corporation June 1999 2 7

The DTM Index Form Function: GetFieldDefaultValue Syntax Function GetFieldDefaultValue(ByVal FieldName As String) As String Parameter Description FieldName Name of the field to retrieve the default value. Returns The default value for the specified field is returned by this function. Comments Use this function in the FormLoad_Event. Example This example gets the default value for FIELD4 and places it in a variable. 2 8 Unisys Corporation June 1999 000000

The DTM Index Form Function: GetFieldValue Syntax Function GetFieldValue(ByVal FieldName As String) As String Parameter Description FieldName Name of the field to retrieve the default value. Returns The current value for the specified field is returned by this function. Comments Use this function in the FormLoad_Event. Example This example gets the current value for FIELD7 and places it in a variable. 000000 Unisys Corporation June 1999 2 9

The DTM Index Form Function: GoToField Syntax Sub GoToField(FieldName As String) Parameter Description FieldName Name of the field. Comments Set the field to where the cursor moves next. Example This example moves the cursor to FIELD2 on the form. 2 10 Unisys Corporation June 1999 000000

The DTM Index Form Function: MenuItemAdd Syntax Sub MenuItemAdd(MenuID As String, MenuCaption As String) Parameter MenuID MenuCaption Description Unique text string identifying the menu item. Caption for this menu item. Comments Creates a menu item on the index form. Example This example creates two menu items and names the menu. 000000 Unisys Corporation June 1999 2 11

The DTM Index Form Function: MenuItemDisable Syntax Sub MenuItemDisable(MenuID As String) Parameter MenuID Description Unique text string identifying the menu item. Comments This function is used to gray-out a menu item so that it cannot be selected. Example This example disables the send menu item. 2 12 Unisys Corporation June 1999 000000

The DTM Index Form Function: MenuItemEnable Syntax Sub MenuItemEnable(MenuID As String) Parameter MenuID Description Unique text string identifying the menu item. Comments This function allows a menu item to be selected. Example This example enables the Send menu item. 000000 Unisys Corporation June 1999 2 13

The DTM Index Form Function: SetFieldCheckType Syntax SetFieldCheckType(FieldName As String, CheckType As FieldCheckType) As Integer Parameter Description FieldName CheckType Name of the field Type of check to perform on the field. The following are the valid constants: NO_CHECK CHAR_CHECK FIELD_EXIT Comments Use this function to set the type of check to perform on a field. Example This example sets FIELD1 for field exit validation and FIELD5 for character checking. 2 14 Unisys Corporation June 1999 000000

The DTM Index Form Function: SetFieldRange Syntax Sub SetFieldRange(FieldName As String, LowValue As String, HighValue As String) Parameter Description FieldName LowValue HighValue Name of the field Value for the low end of the range. Value for the high end of the range. Comments Use this function to change the range values for a field. Example This example sets the range values to FIELD3 to 0 and the low value and 4 as the high value. 000000 Unisys Corporation June 1999 2 15

The DTM Index Form Function: SetFieldValue Syntax Sub SetFieldValue(FieldName As String, Value As String) Parameter Description FieldName Value Name of the field. New value for field. Comments Use this function in the FormUnload_Event to set the value of a field. Example This example set value for FIELD4 using the VarField2 variable. 2 16 Unisys Corporation June 1999 000000

The DTM Index Form Function: SetMenuCaption Syntax Sub SetMenuCaption(MenuCaption As String) Parameter MenuCaption Description Text for the caption of the menu in the Index Form menu bar. Comments Set the caption for the user exit menu on the index form. Example This example sets the menu caption to Terminal. 000000 Unisys Corporation June 1999 2 17

The DTM Index Form Function: WarningMessage Syntax Sub WarningMessage(Message As String) Parameter Message Description Text for the message to display in a message box. Comments Set the text message for a warning message that is displayed to the user. Example This example sets the message to display. 2 18 Unisys Corporation June 1999 000000

Section 3 Developing User Exits for the DTM Index Form Software Components The following software components are required to develop the DTM index form user exit: Visual Basic 5.0 with all service packs. Desktop Manager Index Form User Exit Visual Basic 5.0 Project files. These files are found on the Desktop Manager install CDROM in the UserExit directory. Desktop Manager must be installed on your development workstation, so that you can test your user exit. User Exit Architecture The DTM Index Form User exit is an ActiveX DLL written in Visual Basic 5.0. Desktop Manager checks for the presence of this DLL. If it is found, DTM calls the FormLoad_Event function. The FormLoad_Event function decides whether to perform user exit functions. A separate user exit must be created for each document class that requires extra validation. Version Compatibility Do not change the names or syntax of the functions in the Class module (UserExit.cls) of the user exit. If you do, DTM is NOT able to access the DLL. You must ensure that whatever changes you make keep the DLL Project compatible with the original version. For More Details see, "Version Compatibility in ActiveX Components" in Chapter 7, "Building Code Components" in the Visual Basic 5.0 Component Tools Guide. Sample User Exit Code Included on the DTM install CDROM is a sample project that illustrates how to create a user exit for your own document classes. Use the sample project as a template for your user exit. 000000 Unisys Corporation June 1999 3 1

Developing User Exits for the DTM Index Form Sample Steps to Implement a DTM Index Form User Exit This section describes a series of steps you can use to implement a simple user exit. We start with the files from the Sample User Exit on the install CDROM. While we can t expect to reduce the entire scope of a VB development project to a step-by-step procedure, the steps listed here show how the coding steps fit together with the imaging system components. The following procedure shows you how to set up your own code from the sample user exit code: 1. Desktop Manager is installed with the Sample Desktop and operable. 2. Use an existing document class or Create a new document class using the System Admin Tool 3. Visual Basic 5.0 and all service packs are installed. 4. Copy all files of the Sample User Exit code from the DTM Install CDROM (\UserExit\DTM\DTMIndex) to a directory under the Visual Basic 5.0 directory and name the directory using the document class name. 5. Rename DTMIndex.vbp using the document class name with the VBP as the extension. (<DocumentClass>.vbp) 6. Start VB and open the project your document class.vbp file. (If you get an invalid key error for Apartment Threading Model then the VB 5.0 service packs are not installed. You must at least install VB5 Service Pack 2.) 7. Open the UserExit class module, View the FormLoad_Event procedure. Enter the following statement: 8. In the VB5 Menu, Project Properties; In the Project Name field, change the "MyDocClass" text to the name of the document class for which you are creating a user exit. Also change the Project Description field to identify the document class this user exit is processing. 9. Compile the project (Make your DLL from the File menu of VB) and name the DLL using the document class name, <DocumentClass>.DLL. 10. Run the DTM Sample Desktop, Retrieve a document of your document class and open the index form to verify that your user exit is activated when the index form is displayed. 3 2 Unisys Corporation June 1999 000000

Developing User Exits for the DTM Index Form Registering Your New User Exit When compiling and making a DLL, Visual Basic automatically registers the DLL on your workstation. To use the DLL on another workstation you must use RegSvr32.exe to register the DLL. The syntax is: RegSvr32.exe <Path>\<DocumentClass>.dll. Handling Multiple Document Classes Perform the steps in the previous sections for each document class that requires user exit processing. 000000 Unisys Corporation June 1999 3 3

Developing User Exits for the DTM Index Form 3 4 Unisys Corporation June 1999 000000

Section 4 The Customized Index Form Properties The Customized Index Form User Exit allows you to create your own index form in Visual Basic for the indexing process to handle all input and validation. The following table describes the Customized Index Form User Exit Properties: Events Property Type Description Object_Class String Identifies the document class of the workitem currently being indexed. Object_ID String Identifies the ID of the workitem currently being indexed. Object_Name String Identifies the external name of the workitem currently being indexed. Object_Type String Identifies the type of the workitem currently being indexed. The following table describes the Customized Index Form User Exit Events: Event Parameters Description FormLoad Cancel As Boolean DTM activates this event when the index form should be displayed. FormShow Cancel As Boolean DTM activates this event when the index form should be re-displayed. FormUnload Cancel As Boolean, SaveOption As Boolean DTM activates this event when the user or DTM wants to close the index form 000000 Unisys Corporation June 1999 4 1

The Customized Index Form Functions The following table describes the Customized Index Form User Exit Functions: Function Parameters Description GetFieldDefaultValue FieldName As String Returns the default value for a field. GetFieldFlags FieldName As String Returns the flags value for a field. GetFieldStatus FieldName As String Returns the status value for a field. GetFieldValue FieldName As String Returns the current value for a field. SetFieldValue FieldName As String, Value As String Changes the value for a field. NotifyClient EventType As EventType_Int Raises an event to DTM. Use this to notify DTM that the index form is closed and whether to the save changes. 4 2 Unisys Corporation June 1999 000000

The Customized Index Form Event: FormLoad_Event Syntax Sub FormLoad_Event(Cancel As Boolean, Reserved As Boolean, Modal As Boolean) Parameter Cancel Reserved Modal Description Flag that determines whether this user exit will handle the index form for this document class. If you do not want to process this Object and want DTM to display the DTM index form set Cancel to True. Flag that identifies whether the object is reserved for changes. Flag that identifies whether the index form should be displayed as modal or modeless. Comments Add code to display the appropriate Visual Basic Form. In the Visual Basic forms, use GetFieldValue to get the current values of each index field, or use the FormField collection to enumerate through the index fields. Use the SetFieldValue function to update the fields that you wish to be changed. You must also raise the event NotifyClient to signify to DTM that the Index Form is closed and pass the parameter whether DTM should update the changes or discard them. The syntax is as follows: or 000000 Unisys Corporation June 1999 4 3

The Customized Index Form Example This example tests for the MyClass document class and creates an instance of the appropriate Visual Basic form and displays it. 4 4 Unisys Corporation June 1999 000000

The Customized Index Form Event: FormShow_Event Syntax Sub FormShow_Event() Parameter Description Comments None This event is called when the form should be redisplayed. Example This example redisplays the Visual Basic form mform. 000000 Unisys Corporation June 1999 4 5

The Customized Index Form Event: FormUnload_Event Syntax Sub FormUnload_Event(Cancel As Boolean) Parameter Cancel Description Flag that determines whether the user exit will close the form. Set Cancel to True to specify that the form will not be closed by the user exit. Comments This event is called when DTM or the user needs to close the index form. Example This example unloads the Visual Basic form mform. 4 6 Unisys Corporation June 1999 000000

The Customized Index Form Function: GetFieldDefaultValue Syntax Function GetFieldDefaultValue(ByVal FieldName As String) As String Parameter Description FieldName Name of the field to retrieve the default value. Returns The default value for the specified field is returned by this function. Comments Use this function in the FormLoad_Event. Example This example gets the default value for FIELD4 and places it in a variable. 000000 Unisys Corporation June 1999 4 7

The Customized Index Form Function: GetFieldFlags Syntax Function GetFieldFlags(ByVal FieldName As String) As FieldFlags_lng Parameter FieldName Description Name of the field to retrieve the flags value. Returns The flags value for the specified field is returned by this function. The flags field can be a combination of values. Use the FieldFlags_lng enumeration to determine which flags are set. FieldFlags Enumeration Required = 1 DisplayOnly = 2 NoEcho = 4 UpperCase = 8 RighttJustify = 16 AutoClear = 32 AutoAdvance = 64 GroupTab = 128 RetainZeros = 256 YesNo = 512 Verify = 1024 Scratch = 2048 ValueList = 4096 4 8 Unisys Corporation June 1999 000000

The Customized Index Form Example This example gets the flags value for FIELD7 and places it in a variable and then does a check to see is the field is a required entry. 000000 Unisys Corporation June 1999 4 9

The Customized Index Form Function: GetFieldStatus Syntax Function GetFieldValue(ByVal FieldName As String) As FieldStatus_lng Parameter FieldName Description Name of the field to retrieve the status value. Returns The status value for the specified field is returned by this function. FieldStatus Enumeration Example KeyVerify = 1 OCRVerify = 2 KeyUpdate = 4 ReadOnly = 8 ReadOnlyOverride = 16 This example gets the status value for FIELD7 and places it in a variable and then does a check to see is the field is read only. If it is a read only field then lock the control so that no one can enter data into it. 4 10 Unisys Corporation June 1999 000000

The Customized Index Form Function: GetFieldValue Syntax Function GetFieldValue(ByVal FieldName As String) As String Parameter Description FieldName Name of the field to retrieve the current value. Returns The current value for the specified field is returned by this function. Comments Use this function in the FormLoad_Event to retrieve the value of a field. Example This example gets the current value for FIELD7 and places it in a variable. 000000 Unisys Corporation June 1999 4 11

The Customized Index Form Function: SetFieldValue Syntax Sub SetFieldValue(FieldName As String, Value As String) Parameter Description FieldName Value Name of the field to set the value. New value for field. Comments Must use this function in the FormUnload_Event to change a value for a field. Example This example sets value for FIELD4 using the VarField2 variable. 4 12 Unisys Corporation June 1999 000000

The Customized Index Form Function: NotifyClient Syntax Event NotifyClient(EventType As EventType_Int) Parameter EventType Type of event to signify to DTM: FORM_CLOSED_SAVE_CHANGES or FORM_CLOSED_DISCARD_CHANGES Description Comments Use this function when the indexing form is closed. Example This example raises an event to DTM with the FORM_CLOSED_SAVE_CHANGES option. 000000 Unisys Corporation June 1999 4 13

The Customized Index Form 4 14 Unisys Corporation June 1999 000000

Section 5 Developing Visual Basic Index Forms Software Components The following software components are required to develop the customized index form user exit: Visual Basic 5.0 with all service packs. Desktop Manager Customized Index Form Visual Basic 5.0 Project files. These files are found on the Desktop Manager install CDROM in the UserExit directory. Desktop Manager must be installed on your development workstation, so that you can test your user exit. User Exit Architecture The Customized Index Form User exit is an ActiveX DLL written in Visual Basic 5.0. Desktop Manager checks for the presence of this DLL. If it is found, DTM calls the FormLoad_Event function. The FormLoad_Event function decides whether to process the request or let DTM display the standard index form. The User exit is defined using with Events. This is the mechanism used to communicate back to DTM that the Index form is closed. The User exit can notify DTM to save changes or discard changes via the defined event. DTM checks the parameter and save the index values, if so specified. The user exit must allow multiple index forms to be displayed concurrently. To do this the user exit must create a new instance of the Visual Basic form in the FormLoad_Event function. Version Compatibility Do not change the names or syntax of the functions in the Class module (UserExit.cls) of the user exit. If you do, DTM is NOT able to access the DLL. You must ensure that whatever changes you make keep the DLL Binary compatible with the original version. For More Details see, "Version Compatibility in ActiveX Components in Chapter 7, "Building Code Components" in the Visual Basic 5.0 Component Tools Guide. 000000 Unisys Corporation June 1999 5 1

Developing Visual Basic Index Forms Sample User Exit Code Included on the DTM install CDROM is a sample project that illustrates how to use a Visual Basic Form in the user exit as an index form. MyForm.frm is the sample Visual Basic Form that is used. You can use this as a model for your own VB Form. Use the steps listed in the next section to modify this project with the field names from your document class to test how the index form user exit works. You can include/create additional VB modules to do processing of the index values. The Form_Load function of MyForm.frm shows how to handle form views using the flags and status properties, display the current field values and how to deal with a value list. The Form_Unload function of MyForm.frm shows how to update field values after the user has made changes. Sample Steps to Implement an Index Form User Exit This section describes a series of steps you can use to implement a simple user exit. We start with the files from the Sample User Exit on the install CDROM. While we can t expect to reduce the entire scope of a VB development project to a step-by-step procedure, the steps listed here show how the coding steps fit together with the imaging system components. The following procedure shows you how to set up your own code from the sample user exit code: 1. Desktop Manager is installed with the Sample Desktop and operable. 2. Use an existing document class or Create a new document class using the System Admin Tool 3. Visual Basic 5.0 and all service packs are installed. 4. Copy all files of the Sample User Exit code from the DTM Install CDROM (\UserExit\DTM\DTMForm) to a directory under the Visual Basic 5.0 directory. 5. Start VB and open the project DTMForm.vbp (If you get an invalid key error for Apartment Threading Model then the VB 5.0 service packs are not installed. You must at least install VB5 Service Pack 2.) 6. Pick four fields from your document class to use in this sample. The last field on the form is a combo box control (combo1), pick a field that has a values list for that field. This shows you how values list can be used. 7. Open the UserExit class module, in the FormLoad_Event procedure, find the following statement and replace ProdLine with the name of your document class: 8. Open MyForm.frm and change the Caption property of the four label fields to names that match the four fields you chose in step 6. 9. In the FormLoad procedure of MyForm.frm, change the names of the index fields to the four selected in step 6. 5 2 Unisys Corporation June 1999 000000

Developing Visual Basic Index Forms 10. In the FormUnload procedure of MyForm.frm, change the names of the index fields to the four selected in step 6. 11. Compile the project (Make DTMForm.dll from the File menu of VB). 12. Run the DTM Sample Desktop, Retrieve a document of your document class and open the index form to verify that your index form is displayed. Registering Your New User Exit When compiling and making a DLL, Visual Basic automatically registers the DLL on your workstation. To use the DLL on another workstation you must use RegSvr32.exe to register the DLL. The syntax is: RegSvr32.exe <Path>\DTMForm.dll. Handling Multiple Document Classes To create an index form for an additional document class add another Visual Basic form to the project and in the FormLoad_Event of the UserExit class module, add code similar to what is already there for the sample document class ProdLine. 000000 Unisys Corporation June 1999 5 3

Developing Visual Basic Index Forms 5 4 Unisys Corporation June 1999 000000