Salesforce

Sort Window (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Sort Window (Magic xpa 4.x)

You can access the Sort window by selecting Sort from the Task menu or pressing Ctrl+T.

The Sort window includes a:

  • Segment area on the left-hand side of the window

  • Variable list on the right-hand side of the window

The order in which the segments appear in the window reflects their hierarchical strength, from major to intermediate to minor. This order will control the sorting sequence.

The left-hand side of the Sort window contains the following columns:

Column

Description

Sort Type

This setting indicates the type of sort you want Magic xpa to carry out.

The Sort Type is not relevant for XML data sources and is therefore disabled.

The available options are:

Unique Sort – Indicates that the columns used in the sort are unique. The SQL gateway will not add a position value to the Order By clause command.

According to Index (default) – Magic xpa will determine the uniqueness of the sort by scanning all known Unique Sort indexes. If the sort segments contain a unique index, the sort will be defined as unique. Otherwise, the sort will be defined as non-unique.

#

This read-only column contains an automatically generated sequential number used by Magic xpa as an identifier.

Var

The letter identifier of the variable. You can type the letter identifier or you can zoom to the Variable list on the right-hand side of the window to select a variable.

Variable Name

This read-only setting shows the name of the variable chosen as a segment.

Size

The insertion point parks in this column only if the variable attribute of the chosen variable is Alpha. You can then shorten the size of the segment variable. The leftmost characters included in the new size are used as the index.

This property is for performance and memory considerations. Set the size according to the number of significant characters for the sort. Including characters beyond this size is unnecessary. If the index segment is shorter, the sort process is faster, and the sort file is smaller, due to better utilization of index space.

Some SQL databases do not support sorting by part of a field.

Direction

Direction indicates the direction of the sort, according to the active collating sequence.

  • Ascending means that the sorting direction of the segment is 'ascending'.

  • Descending means that the sorting direction of the segment is 'descending'.

Each particular database you can use with Magic xpa may have its own limitations concerning, for example, the number of segments or the maximum size allowed for an index. Sort tables are created using the Database for Sort/Temporary environment setting.

In any case, when you develop with a particular database gateway, Magic xpa will check your definitions according to the database limitations and will prompt you accordingly.

Sorting in SQL databases may use the Sort Using RDBMS feature.

For Local databases, sorting is not supported for columns of a linked table when the Direction property is set to Descending.

Related Topics

Reference
Attachment 
Attachment