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 the sort in the format supported
native to the data source. A native sort is interpreted by the data
source, while a
Rational Publishing Engine sort
is processed by
Rational Publishing Engine as
it extracts data from the data source.
For more information on native
sorts, consult the data source documentation for details on the appropriate
syntax.
Instead, you can create a sort
in
Rational RequisitePro®:
- Create a table and enter data.
- Sort the data.
- Create a view and save the data to it.
- Export the view to use as a data source schema in Rational Publishing Engine.
The data services automatically detects the view.
- Add the data source schema to your Rational Publishing Engine template.
The
Rational RequisitePro data
that is generated in the
Rational Publishing Engine output
retains the sorting from the view, however, some nested data might
not display as nested.
Procedure
- Select an element in the template content editor.
- In the Properties view, expand Data.
- In the Sort property, click the
ellipsis. The Sort Editor window
displays.
- Specify the sort conditions:
- To use a native sort, click the Native tab
and enter the sort expression in the Native window.
Click OK.
- To use the Rational Publishing Engine sort,
double-click an item in the Script tab to add to the sort expression.
Then select the sorting order from the list displayed against the
items.
Whenever possible, use a native sort. The native sort generates
documents more quickly than a Rational Publishing Engine sort.
- 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 sort in the data source
to verify its accuracy.
Example
Rational DOORS® example
of creating a Native sort in a templates:
To define
a native sort for a
Rational DOORS data
source:
- Open a Rational DOORS Module
and click .
- In the Sort on field, select Object
Text.
- In the Order field, select Descending.
- Click Add.
- Click OK to save. You now have the Rational DOORS Sort
available in the Sort List.
To copy the
Rational DOORS sort
to
Rational Publishing Engine:
- Select the template element that contains the query to be sorted.
- In the Properties view, expand Data.
- In the Sort property, click the ellipsis.
The Sort Editor window displays.
- In the Native tab, enter Descending
Object Text.
Note: Rational Publishing Engine cannot
check if the native sort is correct. Review the sort in the data source
to verify its accuracy.
What to do next
You can remove the sort expressions by clicking
Remove option
displayed against each item. To remove all items, click
Remove
All.