BrowseQueryButton

Top  Previous  Next

The BrowseQueryButton template provides a Query button to let the end user apply a dynamic (run-time) filter to the BrowseBox result set. In other words, the end user can query the underlying dataset and display the results of the query in the BrowseBox list.

The default query interface is a dialog with an input field and a comparison operator button for each list box column.

The end user may provide filter criteria for zero or more fields. Additional filter criteria result in a more refined search and a smaller result set (the filter conditions are conjunctive--ANDed together).

Runtime Options

The default comparison operator is ( = ), which searches for an exact match between the BrowseBox field and the corresponding Query input field. By default all matches are case sensitive. Pressing the comparison operator button cycles through all the available operators:

Operator

 

Filter Effect

 

=

browsefield

equal

queryvalue

>=

browsefield

greater than or equal

queryvalue

<=

browsefield

less than or equal

queryvalue

<>

browsefield

not equal

queryvalue

 

no filter

 

 

For string fields, you may use the following special characters in the Query input field to refine your search:

Symbol

Position

Filter Effect

 

 

^

prefix

caseless (case insensitive) search

 

 

*

prefix

browsefield

contains

queryvalue

*

suffix

browsefield

begins with

queryvalue

For example:

d

- matches 'd' only

d*

- matches 'dog', 'david'

*d

- matches 'dog', 'cod'

^*d

- matches 'dog', 'cod', 'coD'

Upon completion of the Query dialog, the current sort order of the BrowseBox is filtered to match the query. If Query is selected again, the previous query is available by default. This allows sharing of filters between sort orders, as well as successive filter refinements.

The standard Query behavior is defined by the ABC Library's QueryClass. See QueryClass, QueryFormClass, QueryFormVisual, QueryListClass, and QueryListVisual for more information.

The BrowseQueryButton template provides the following prompts:

General

QBE Family

Enter the family name that this QBE object will use. Normally, the QBE family will default to the procedure name. However, there may be situations where you would like saved queries to be shared between one or more procedures. In this case, use a common family name between these shared procedures.

QBE Interface

Select the query interface from the drop-down list. Choose from

Form One input field and button per Query field

List One listbox row per Query field

Auto Populate

Check this box to provide a query dialog with filter criteria for each field in the BrowseBox. The input fields have the same picture token and prompt as the corresponding BrowseBox field.

Clear this box to enable the Fields button and specify custom query input fields.

Caseless Auto Populate

Check this box to provide a query dialog where the filter criteria will not be case sensitive for each field in the BrowseBox.

Fields

Press this button to populate specific query input fields. You can use this option to restrict the query to some subset of BrowseBox fields, or to expand the query to include fields not in the BrowseBox. You can also implement caseless searches by default.

Field

Type the field name to include in the Query dialog, or press the ellipsis button to select the field from the Select Field dialog.

Title

Type the prompt or label associated with the Query field.

Picture

Type a picture token for the Query field, or press the ellipsis button to select a token with the Edit Picture dialog.

Caseless

Check this box to do case insensitive searches on the Query field. Clear the box to do case sensitive searches.

Disable Begins/Contains?

Check this box to disable Begins/Contains queries. This is available for the QBE form interface for any non-string field.

Retain Query

This option is checked by default, and indicates that the end-user's query will remain in the Query dialog on the subsequent press of the Query button. Clear the check box to reset the Query dialog on each press of the Query button.

Use on startup

Check this box to open the Query dialog before the Browse procedure opens.

Result Control

Optionally select a STRING Control from the Droplist to display the filter statement created by the QBE object. A property assignment is made to the selected control (using PROP:Text), therefore it is not necessary to associate a variable with the STRING.

Auto-share between tabs

Check this box to make the query active to all tabs associated with the browse.

Quick QBE Settings

Check the Quick QBE Support to enable special popup menu support for saved queries. A View menu item will appear in the Browse box popup menu, with a sub-menu of saved queries. You can customize the View menu popup icon by modifying the Submenu Icon prompt. Customize the saved query items by modifying the Query Icon prompt.

QBE Class

Select this tab to override the global Query Manager setting. See Template Overview--Classes Tab Options--Global and Local.

QBE Visual Class

Select this tab to override the global Query Manager setting. See Template Overview--Classes Tab Options--Global and Local.