User's Manual

Advanced Queries
21.1 Advanced Queries
21
21-5
21.1.2.2 Sort Fields Section
This section lets you determine how the advanced query records should be sorted. For
example, you might want to generate a query list in which the instrument records shown
are sorted by Department. Sorting by one or more fields is not necessary, however it will
make your advanced query listings more organized. To select a field to sort by, highlight
it in the Available Fields box and click the Add
button. To move it back, highlight it
again and click the Remove
button.
21.1.2.3 Selection Criteria Section
This section, which comprises the entire gray area of the screen, is the most important
part of constructing an advanced query. It is in this section, that you state the selection
criteria that must be met in order for a record to be included on the query list generated.
If you plan to use at least two different sets of selection criteria then you must click either
the And or Or circle. If you choose And, the query will include those records that meet all
of the selection criteria you have defined. If you choose Or, the query will include
records that meet either one set of selection criteria or
the other. If you are only going to
use one set of selection criteria, then it does not matter which circle is marked.
For every set of selection criteria that you decide to use in your query, you must perform
the following steps:
1. Choose a field from the Selection Field Name drop-down list.
2. Select an Operation (i.e. =, >, <, etc.).
3. Enter a Selection Value. Depending on the type of Selection Field Name you chose in
Step 1, the Selection Value may either be typed into this field manually or selected
from a drop-down list. For example, if your Selection Value were a date, then you
would key the desired date into the field or select a date keyword from the drop-down
list. However, if the value is a manufacturer, then the manufacturer’s name can only
be inserted into the field by selecting it from the drop-down list. (The drop-down list
is activated upon declaration of the Selection Field Name in Step 1. In this example,
it would contain all manufacturers that have been assigned to at least one instrument
record in the system for the company.)
4. Once you have performed Steps 1-3, you must click the Add To Selection Criteria
button which will move it into the Selection Criteria During Query Execution box.
5. Click the Execute
button to generate the query list.
An example of a completed advanced query can be seen in Figure 21.3 on the next page.
It shows an advanced query for the MASTER INSTRUMENT RECORD screen that will
generate a list of every instrument manufactured by “Foxboro” and is calibrated
“Annually”. The query will also sort the listed records by their Last Cal Date. Finally,
data from the following fields will be shown for each record included in the query list:
Instrument ID, Description, Calibration Frequency, Last Cal Date and Manufacturer.