IBM Datacap, Version 8.1            

Overview of the vendor lookup hyperlink

Taskmaster DotEdit creates the Vendor lookup hyperlink at runtime. When a user clicks the hyperlink, DotEdit starts the associated lookup routine, which searches the vendor table for vendors that match the search string that the user entered in the vendor name field. When a user selects a vendor from the grid, DotEdit populates the vendor name and vendor number fields.

The lookup routine is defined in Datacap Studio and is determined by the Lookup variable in the Vendor field in the document hierarchy of the application. The Lookup variable instructs Taskmaster DotEdit to hyperlink the field label at runtime and to run the associated code when a user clicks the label.

The full string assigned to the Lookup variable is shown below:

<SQL flist='Vendor,Remittance_Zip,Vendor_Number' dsn="APTLook">SELECT VendorName,VendorZip,VendorID 
 FROM VendorTable 
 WHERE VendorName like '@@Vendor@@%'</SQL>
flist Identifies which fields to populate using the search results (Vendor, Remittance_Zip, and Vendor_Number).
dsn Identifies the ODBC source or connection string (APTLook).
SELECT SQL command identifying the fields to extract (VendorName,VendorZip,and VendorID), the table to extract from (VendorTable), and the source for search string (the Vendor field).

To use an ODBC data source in the Lookup variable, use the dsn-DSN notation. This notation is helpful when you are supplying the user name and password and the credentials are not stored in the ODBC data source.

The following example describes a lookup that is using a SQL fingerprint database:
<SQL flist='Vendor'dsn="DSN=TestFP;User ID=uid;Password=pwd">SELECT tp_TemplateID FROM Template FROM Template</SQL>
In this example, the Vendor field is updated with the value that is stored in the template ID tp_templateID column of the record that the operator selects. The user name uid and password pwd values are used to login to the SQL database that corresponds with the DSN TestFP. TestFP might not be the exact database name.


Feedback

Last updated: November 2013
dcapi480.htm

© Copyright IBM Corporation 2013.