TOC PREV NEXT INDEX DOC LIST MASTER INDEX




Tasks > Query (Summit/TM)

The Tasks > Query command is used to search a set of candidate tasks for tasks that satisfy user-specified criteria. The query to be performed is expressed in the Summit task query language. The query language is described in detail in the Summit/TM User's Guide.

The Task Query dialog (displayed by this command) can be used to compose, edit, and execute a query. The dialog can produce a task list file containing the pathnames of the matching tasks. It can also display a sorted listing of selected fields of these tasks in a task summary window.

When you choose this command, the Query Task dialog box appears.

The upper part of the dialog (labeled Query Text:) displays the current text comprising the query. This text may be edited directly or via other components of the dialog.

The lower part of the dialog contains an options menu that displays alternative pages of the dialog that support specific functions as follows:

Query File
Loads task query files into the Query Text window, saves the query text, and specifies output options such as a destination task list file.
Task Kind
Specifies the "current" task kind and domain for the dialog. The current task kind determines which field names are displayed by the Alternatives icons for the field-name fields in the dialog.
Select Clause
Edits the select clause of the query which consists of a list of task fields to be displayed.
From Clause
Edits the from clause of the query which specifies the set of tasks to be searched.
Where Clause
Edits the where clause of the query which specifies criteria for task selection in the form of an expression that may include field-value comparisons, logical operations, and invocations of other queries.
Order By Clause
Edits the order by clause of the query. The order by clause specifies which fields are used to sort the selected tasks and the sort direction (ascending or descending) for each field.

In the case of a simple query that is not to be saved in a file, it is often necessary to compose only a where clause. Hence, for convenience, the Where Clause page is displayed initially. On the other hand, if the dialog is accessed through a task query file, the Query File page will be displayed initially.

Task Query Dialog Box Fields:

Where Clause Page

Edits the where clause of the query. The where clause contains an expression that is evaluated for each task searched to determine whether that task should be selected by the query and included in the output.

The where clause usually contains one or more field-value comparisons which may be combined using logical operators (and, or, xor, and not) and parentheses.

Simple Examples Using only the Where Page

Find all tasks (in the default task domain) that are assigned to "fred":

1. . Enter "assigned" in Field

2. . Enter "fred" in Value

3. . Press Add Comparison > Field-Op-Value

4. . Press OK

The query text is

Find all tasks that are assigned to "fred" and have the priority "medium" or higher:

1. . Enter "assigned" in Field

2. . Enter "fred" in Value

3. . Press Add Comparison > Field-Op-Value

4. . Enter "priority" in Field

5. . Select ">=" in Op

6. . Enter "medium" in Value

7. . Press Add Comparison > Field-Op-Value

8. . Press OK

In this example, the and operator is inserted automatically. The query text is

Find all tasks that are assigned to either "fred" or "mary":

1. . Enter "assigned" in Field

2. . Enter "fred" in Value

3. . Press Add Comparison > Field-Op-Value

4. . Press or

5. . Enter "mary" in Value

6. . Press Add Comparison > Field-Op-Value

7. . Press OK (tasks assigned to "fred" or "mary" are displayed)

The query text is

Query File Page

This page is used to load and save task query files and to specify output options for query execution

Task Kind Page

Specifies the "current" task kind and domain for the dialog. The fields defined by the current task kind are displayed by the Alternatives icons of the field-name fields in the dialog

Select Clause Page

Edits the select clause of the query. The select clause contains of a list of task fields to be displayed in the query output. If this clause is omitted, the default fields for the task kinds of the selected tasks are displayed.

When this page is grayed (insensitive), the Recheck box described earlier must be cleared to revalidate the query before the page can be used

From Clause Page

Edits the from clause of the query. The from clause specifies the set of tasks to be searched. If this clause is omitted, the tasks in the default domain are searched

Note: The order of elements in the Select Tasks From list box has no effect on the execution of the query.

Order By Page

Edits the order by clause of the query. The order by clause determines how the selected tasks are sorted, according to field values. If this clause is omitted, task are sorted by ascending task ids

A sort field is added by entering its name in the text field below the list box and pressing the Add: button on the left. The Field Direction option indicates whether the field is to be sorted by ascending or descending values. New fields are added after the last selected entry in the list, or as the first entry, when no list entry is selected. A given field may appear only once.

The Alternatives icon displays the field names defined by the current task kind (see Task Kind Page above).

Additional Topics

For additional information, refer to these topics:


Rational Software Corporation 
http://www.rational.com
support@rational.com
techpubs@rational.com
Copyright © 1993-2001, Rational Software Corporation. All rights reserved.
TOC PREV NEXT INDEX DOC LIST MASTER INDEX TECHNOTES APEX TIPS