Product: LABELVIEW, CODESOFT
Version: All Versions
|
OVERVIEW
The table lookup feature allows you to connect to another data source, other than the one merged with the current document. From that data source, you can select the table and the field (called the “result” field) that contains the data you are looking for.
To obtain the data from the result field, you identify a key field in the external database and a key field (an existing variable) in the merged database that will allow the result field to be displayed.
PROCEDURE
The procedure for setting up table lookup variables is similar to that for creating database variables. You will be connecting to an external database using the ODBC Administrator. This requires installing a driver if necessary, selecting a data source and associating it with a database. Once the connection is made, you define the table and field from which you want to extract data. You then associate the data with a key field and a key value (variable) in the current document.
Table lookup variables are classified according to the table name from which they are extracted. The table name appears under Table lookup (in the Data sources tab of the Document Browser). If you have multiple variables from the same data source, you can add them directly by right-clicking the table name. The properties dialog box for the variable will be pre-configured with the data source information.
The When Printed variable is needs to be a part of the data source that all of the rest of the information is a part of. In this example, the When Printed field is Serial Number, which is a field in the data source we will be connecting to.
NOTE: The process for creating a When Printed variable can be found here.
For example, we will name this Color and have it display the Color based on the When Printed field.
NOTE: The process for connecting to a data source can be found here.
In this example, we'd like the Table Lookup to return Color.
This is what the Key value will be compared to. In this example, the name of the database column is Serial.
Another way to think of this is what is the name of the "When Printed" field that the search information is based on. In this example it is Serial Number.
NOTE: The Use format value with the key-value checkbox (Under Data formatting tab) allows the use of the variable value with its formatting (prefix, suffix…) as the key value.
|