|Query by Example||Version 188.8.131.52|
The Query By Example (QBE) pattern locates records that match specified criteria in a table.
|Pattern Set Decision Table|
|Must the filter attribute always correspond to a table column?||No||Yes|
|Must the filter always be visible?||Yes||No|
|Is the user typically an expert?||No||Yes|
|Query by Example|
The QBE bar is hidden by default until the user selects View, Query by Example or clicks the Query by Example icon button on the toolbar. Product teams can choose to show the QBE bar by default when they expect the frequency of use to be high.
|Figure 1. QBE bar and fields|
Refreshing Table Data
Place a Search icon button on the table toolbar and a redundant Refresh command in the View menu.
There must be a visual affordance for rerunning the query that populates the table. Without it, users must discover that they can requery the table data by pressing the Enter key when a QBE field has the focus or by clicking the Search button in the query panel when one is present.
QBE cells default to blank on page load. After entering filter critiera, users must manually clear each QBE field. You should provide a Clear button in the table toolbar to enable users to clear all QBE fields with a single click. You should also provide a redundant Clear Filters command in the View menu.
|Figure 2. Search and Clear buttons on the toolbar and Refresh and Clear Filters commands in the View menu|
|QBE and Search|
Search criteria entered in QBE fields are ANDed with the search criteria. For example, a search criterion of Supplier="Oracle" plus a QBE criterion of Status="On Time" yields the query Supplier="Oracle" AND Status="On Time".
QBE cell values interact with search criteria as follows:
|Figure 3. QBE fields on a search results table|
|Required Screen Elements|
|Component Type||Required Components||Customizable or Extendable Components|
|Table||QBE Bar||Can be disabled|
|Table||QBE Field||Can be disabled on a per column basis|
|Table Toolbar||Query By Example button||NA. Enabled whenever QBE bar is enabled|
|Table Toolbar||View, Query By Example menu item||NA. Enabled whenever QBE bar is enabled|
|Table Toolbar||Search button||NA|
|Table Toolbar||View, Refresh menu item||NA|
|Table Toolbar||Clear button||NA|
|Table Toolbar||View, Clear Filters menu item||NA|
|Transactional Search||Pattern set used to select a user interface (UI) for search limited to one business object|
|Saved Searches||Pattern set used to select different saved searches by using the View menu, tab equivalents, or a choice list.|
|Search and Query Usage guideline||Usage and behavior of ADF Query and Quick Query|
|Table Usage guidelines: Table Elements||Detailed descriptions of the elements that can be used in each region of a table|