Validation Module DBLOOK2Purpose:Search external database and optionally replace data. Usage:DBLOOK2("dbfname","alias","index",value,"errmsg","expression") dbfname is the absolute or relative [from Image-Master home] path to the dBase 3,4, or FoxPro database to be searched enclosed in quotation marks as indicated above. alias is a user defined alias used to reference the searched database on subsequent calls. If an alias is specified, the system will not close the database upon exiting the function. If no alias is specified ("") then the database WILL be closed after the function terminates. index is an optional index TAG or filename. (see below)
value is the value to SEEK if an index is being used, if an index is not being used (index="") then value is an expression to be evaluated by LOCATE FOR and must be enclosed in quotes. errmsg is the error message to display to the user if the search fails. expression is the actual Field Replacement Expression enclosed in quotation marks as indicated above. Search and Copy Existing Matching Database Entry InformationA key field can be designated to search and copy information from existing documents in Image-Master scanned for the same party or similar matter or topic. When the user types in information in the key field, the database is searched for any existing entries that match. If a match is found, a subset of the existing information can be brought into the current entry and other actions can be taken. The user is given immediate visual feedback that a match was located, and can edit the copied information to make the new document unique in the database. A common use for this feature would be to avoid having the scanning operator type identifying information that is repeated verbatim for multiple documents. NOTE: The term key field usually refers to a single field, but does not have to be limited to just one. The rule configured may reference multiple fields on the Data Entry window. In addition, this feature can be implemented more than once on the Data Entry window in order to aggregate information from multiple sources within the Image-Master database. How to Configure
NOTE: An 8.3 filename (also called a short filename or SFN) is a filename convention used by old versions of DOS, versions of Microsoft Windows prior to Windows 95, and Windows NT 3.51.
SDBLOOK ExampleGiven a database with the following structure.
"Phone" is a key field that can be used to perform a lookup to determine the "Company" as well, and optionally the "Address" too if that was appropriate.
In the Validation Clause for the "Phone" field, the complete expression to be typed is: SDBLOOK("phone",trim(m1phone),"m1comp=comp") If both "Company" and "Address" need to be replaced, a file needs to be created to store the multiple FREs. The text file ADRREPL.TXT contains:
The Validation Clause for the "Phone" field would change to: SDBLOOK("phone",trim(m1phone),"~ADRREPL.TXT")
NOTE: Search value is an expression and must match the data type and size of the "Key" field. If it does not, then the lookup will always fail to find matching information. NOTE: When sourcing search values from the Data Entry window, the size of these variables (m1...) may not match the associated fields exactly and must be extracted before they can be used. Numeric and date data types do not need to be extracted and can be specified directly. Character data types need to be extracted. The type of extraction chosen will depend on the uniqueness of the match desired.
How to Use
Related TopicValidation Modules Introduction
|