IBM Datacap, Version 8.1            

Lookup

Applies to

Applies Does not apply
Setup DCO Runtime DCO

Verification panels that support this variable

Support this variable Do not support this variable

DotEdit

Taskmaster Web (VeriFine.aspx)

Taskmaster Web (aindex.aspx)

N/A

Description

Specifies a database lookup statement that gets run during verification when the user clicks the hyperlinked field label. A list of matching entries from the database that is specified by the dns attribute is displayed. The selected entry is used to populate the fields that are specified in the flist attribute.

Example

The following sample Lookup value gets a list of car types from the lookup database that is specified in the application configuration (.app) file. The sample code then populates the Car_Type field with the selected value.

<SQL flist='Car_Type' dsn="*/lookupdb:cs">SELECT Car_Type FROM Car_Types</SQL>

The next example (from APT) gets a list of matching vendor names, ZIP codes, and vendor IDs from the application's lookup database. The list is then displayed to the user. The SQL statement uses the text in the Vendor field as the search string. The user can then, for example, enter the first letter and see a list of vendor names that start with that letter. Upon selecting a vendor from the list, it populates the Vendor, Remittance_Zip, and Vendor_Number fields with the information for the selected vendor.

Attention: The carriage return in the following example is only for readability; it is not technically required.
<SQL flist='Vendor,Remittance_Zip,Vendor_Number' dsn="*/lookupdb:cs">
SELECT VendorName,VendorZip,VendorID FROM VendorTable WHERE VendorName LIKE '@@Vendor@@%'</SQL>

Note in this example the special syntax that is required to reference a field value from the SQL statement: @@Vendor@@%. Note also that WHERE <column> = '<value>' is not supported.



Feedback

Last updated: November 2013
dcadg317.htm

© Copyright IBM Corporation 2013.