Application DesignRetrieve Data from a Database

You can use a business rule to perform data lookup, retrieving and incorporating information that was not available in the original print request. For example, you could compute a product number based on a serial number or retrieve an origin and other values based on a lot number.

Important! Content in a business rule is case sensitive.

The following example is a component set in a business rule that queries a database table and selects a label template based on a Customer ID. The trigger for this component set is job submission. In this example, the following query is used:

SELECT SHIPPING_LABEL FROM LW_INFO.SHIPPING_XREF WHERE CUSTOMER_ID=${/Body/CUST_ID}

Note: This business rule requires the existence of a JDBC data service that establishes a connection to a database. In the data service, Is Parameter is selected for the SQL Query. For more information, see Managing Data Services.