In addition to extracting fields from the incoming messages, ThinkAutomation allows you to create lookup fields. Lookup fields are used to read data from external databases.
For example, you may have extracted the Field 'SalesPerson' from the incoming message. You could create a lookup field to lookup the SalesPerson name from a table in your database.
To create a lookup field click the Add Lookup Field button on the Ribbon bar:
Enter the Field Name.
You must then specify the Database Connection String to the database that you want to lookup data from. Click the Build button to build a connection string. You can lookup data from any database accessible on your computer that has an ODBC or ADO provider (such as SQL Server, Access, MySQL etc). You can also use a Constant here. See Also: Connection Strings
Enter the SQL Select Statement to use to retrieve the data. Use %fieldname% replacements in the WHERE clause if you want to find a record using data from previously extracted fields.
In the Return Field entry enter the field name to return, or leave blank to return the first field.
When ThinkAutomation executes the lookup statement it will return the field value for the given field from the first record that matches the WHERE clause of the SELECT statement. The value will then be assigned to the ThinkAutomation field.
Enable the Cancel Trigger If Lookup Fails option if you want ThinkAutomation to abort processing of the trigger if no record is returned by the lookup. ThinkAutomation will then stop processing the incoming message as if the trigger conditions where not met.
Once the field value is read from the database, you can apply the same Extraction properties, Attributes, Database Field and Pass To properties as with normally extracted fields.