Defining Sort

You define a sort in a query to extract data in a specific order.

Before you begin

A sort can be specified using the native sort or IBM® Rational® Publishing Engine sort. The native sort allows you to enter sort in the format supported natively by the data source. A native sort is interpreted by the data source. A Rational Publishing Engine sort is processed by Rational Publishing Engine as it extracts data from the data source.
Note: For native sort, consult the data source documentation for details on the appropriate syntax.

Procedure

  1. In Document studio, in the Properties view, expand Data.
  2. In the Sort property value column, click the ellipses. The Sort Editor window displays.
  3. Specify the sort conditions:
    • To use Native sort, click the check box against Native and enter the sort expression in the Native window. Click OK.
    • To use the Rational Publishing Engine sort, in the left pane, double-click the item to add a sort expression and in the right pane, select the sorting order from the list displayed against the items.
  4. Click OK.

Results

The selected sort order is added to the current element.
Note: Rational Publishing Engine cannot check if the native sort is correct. Review the native sort to verify its accuracy. For IBM Rational DOORS® Data Sources, you can test the native sort in Rational DOORS to verify its accuracy.

Example

Rational DOORS example of creating a Native sort in a templates.

Note: Whenever possible, use a native sort. The native sort generates documents more quickly than a Rational Publishing Engine sort.
To define a native sort for a Rational DOORS data source:
  1. Open an Rational DOORS Module and click Tools > Sort.
  2. In the Sort on field, select Object Text.
  3. In the Order field, select Descending.
  4. Click Add.
  5. Click OK to save. You now have the Rational DOORS Sort available in the Sort List.
Rational DOORS sort window for Rational DOORS example.
To copy the Rational DOORS sort to Rational Publishing Engine:
  1. Select the template element that contains the query to be sorted.
  2. In the Properties view, expand Data.
  3. In the Sort property value column, click the ellipses. The Sort Editor window displays.
  4. In the Native tab, enter Descending Object Text.
Note: Rational Publishing Engine cannot check if the native sort is correct. Review the native sort to verify its accuracy. For IBM Rational DOORS Data Sources, you can test the native sort in Rational DOORS to verify its accuracy.
Sort editor window for Rational DOORS example

What to do next

You can also remove the sort expressions by clicking Remove option displayed against each item. To remove all items, click Remove All.

Feedback