Query Combobox Configuration

The Query Combobox is designed to accept a search term and when the user presses the down arrow or focus leaves the control a search will take place. The results of the search will be displayed as a drop down list or if there are more than 15 values a dialog box will appear. The query Combobox is used in a Many-To-One relationship. For example, in the Preparation form there is a 'Prepared By' field, a user types in a portion of the last name and then presses the down arrow key to perform the search. The QCBX Config is used to describe what field will be search, the query to be executed, and what data object or fields will be displayed in the drop down list.

Field Decription
Table The table that will be search to locate a record, where data in the record (data object) will be displayed in the drop down list.
Name The unique name for the QCBX formatter.
Display Columns The field names that be displayed in the text portion of the CBX (Note: These are field names and not column names; which are typically the column name with the first letter lowercase.
Search Field Name The single field that will be search against from the user important.

Ths C/C++ sprintf format that is used to format variables to strings. (Documentation) For example:

%s - string
%f - decimal number
%d - integer

UI Field Formatter Name The name of a UI Field Formatter that can be used to format the field instead of the Format string. (Press 'esc' to clear).
Data Obj Formatter Name The HQL can return a complete data object instead of individual fields. When this is done a 'DataObjFormatter' can be used to format the data object.
HQL Template

The HQL (Hibernate SQL) that is needed to return one or more objects from input from the user. The HQL must contain two tokens '%s1' and '%s2.' The '%s1' token is placed where the field list would normally go. The '%s2' is an additional expression that will augment the WHERE clause. This means there must be a WHERE clause and if there are other comparisons the '%s2' should always be included with an 'AND.'

Please note: The Format, UI Field Formatter and the Data Object Formatter are all mutually exclusive, meaning only one of them can be used at a time.