Bookshelf Home | Contents | Index | Search | PDF |
Siebel Tools Reference > Business Objects Layer > Business Components >
Sort Specification Property
The value in the Sort Specification property, if it is non-blank, is the name of a field or list of fields that imposes a sort order on the records returned to an applet that is associated with this business component. The field or fields must be child object definitions of the business component.
For example, the Account business component (as delivered in Siebel applications) has a Sort Specification property value of "Name, Location." This indicates that account records are provided in Name (account name) order, and where multiple account records have the same Name, they are to be sorted within Name by Account Location.
Observe the following syntax considerations:
- Use commas to separate field names in a sort specification.
- To indicate that a field in the list sorts in descending order, include (DESCENDING) or (DESC) after the field name, as in "Start Date (DESCENDING)." If you do not specify a sort order, ascending order is used.
- Do not enclose the field name in square brackets, as in [Account Name]. Brackets are accepted in search specifications, but not in sort specifications.
- The sort specification expression must be 255 characters or less.
Be aware that sort specifications have the following behaviors:
- If the Sort Specification value is blank, the Siebel application returns the records in the order in which they occur in the table.
- When a check box field is included in a sort specification, there are three values that are sorted: Y, N, and NULL. If you specify that the sorting is in Descending order, the order is NULL, Y, and N.
- When a multi-value field is included in a sort specification expression in a business component, the sorting is on the initial value of the multi-value field. This makes sense only if the multi-value group uses a primary foreign key.
- A sort specification that includes a multi-value field in the expression does not sort the records in the underlying multi-value group. Instead, you create a sort specification in the detail business component of the multi-value link to do this.
- For sorting the values in a static picklist or pick applet differently than the default sorting for the underlying business component, the sort specification on the business component can be overridden with a sort specification on the picklist. The default value for the Sort Specification property in a Pick List object definition is blank, which means that the business component's sorting is to be used. If a sort specification appears in the picklist, this overrides the business component's sorting with that of the picklist.
NOTE: If a predefined query exists, it can potentially override a sort specification that has been defined as a property of the business component.
Improperly chosen sort specifications can hurt performance. This is particularly true when the sorting is on fields based on joins. Siebel Expert Services will review any custom search or sort specifications when performing a configuration review, in order to identify any potential performance issues.
Siebel applications force the sort in the All visibility mode to be on the primary key. The sort in Manager mode is on a column in the denormalized reporting relationship table. Users can still sort records after the initial query. For better performance, you should sort records after filtering for a small record set.
NOTE: Null records will always appear at the top of the record-set if a sort specification is placed on a field with null values.
Bookshelf Home | Contents | Index | Search | PDF |
Siebel Tools Reference, Version 7.5, Rev. A Published: 18 April 2003 |