SysTableLookup class

The SysTableLookup class is provided by the standard application to allow programmers to easily create their own lookup forms, in code.

The basic steps to using this class are as follows:
 * 1) Create the sysTableLookup object
 * 2) Create the query which will be used to select the lookup data
 * 3) Specify the fields which will be shown on the lookup
 * 4) Perform the lookup

In this example, we will perform a complex lookup on the customer table. We only want to include customers which are not blocked, and where one or more open transactions exists.

While the above example will work perfectly, you should consider moving this code out of the lookup method on the form control itself. For ease of re-use and to maximise ease of upgrading of the forms, it is better to construct the lookup as a static method on the CustTable which can then be called from the form. Don't forget to remove the super call from the method. Otherwise your Lookup won't work.

For example:

In the form control lookup method: