Navigation: Templates > Guide to all Templates > Extension Templates >====== Additional Sort Fields Dialog ====== | |
The Additional Sort Fields Dialog is a built-in extension of the Browse, Process, and Report procedures. Its function is to add additional sort fields to the default sequence that data is processed. This sequence can be applied to the procedure's default sort behavior, or to conditional behavior if supported. If no default sort is specified (no key), the additional sort fields dialog sets the primary sort.
This dialog is supported in both ABC and Clarion template chains. The sort sequence selected applies to the appropriate ABC method or ORDER property required.
For Clarion Chain and SQL users:
For the re-positioning of the list box cursor against a SQL back end and using the Clarion Template Chain, the columns defined in the Additional Sort Fields do NOT come into play. You MUST define a KEY in the dictionary that has the Columns that you need in order to define a Unique Row in the database. You will need such a Key defined for all Sort Orders that you require. Additionally, if you have an Index on the back end that corresponds to this key, the Database Engine will use it, thereby enhancing the performance for that particular order.
Sort Type
Manual
Press the “E” button to call the Expression Editor. This dialog is used to help you construct syntactically correct expressions to use in the Additional Sort Fields prompt. This allows you to manually construct a sort string using the following syntax:
“+FieldLabelOne,-FieldLabelTwo,'“
An incorrect string will result in no sorting, and may generate a compile error.
Assisted
The Assisted method is designed to build a correct sort string. Use the update buttons provided to add your sort fields to the list. In the additional dialog, provide the following information:
Field
Use the ellipsis to select a field name from the Select Column dialog.
Order
Select Ascending or Descending from the drop list, to designate an ascending or descending sort order.
ConditionalAssisted
Valid for Report and Process only. The Conditional Assisted sort type adds a condition to the assisted method, where the additional sort fields will only be applied when the condition is true.
Condition
Use the ellipsis to select a field name from the Select Column dialog. When this field or column is non-zero, the additional sort fields will be applied.
Field
Use the ellipsis to select a field name from the Select Column dialog.
Order
Select Ascending or Descending from the drop list, to designate an ascending or descending sort order.
DynamicSorting
Valid for Report and Process only. This Sort Type generates a dynamic sort window at runtime, where your users can modify (prior to generating the report) the sort components as to the report's order and component sort type (ascending or descending). Use the update buttons to add the fields that you wish to present to the user here. This sort type is useful when your sort components are fixed, but the user needs to switch the order and sequence occasionally.
Description
Enter a description to use for the field name.
Field
Use the ellipsis to select a field name from the Select Column dialog.
Order
Select Ascending or Descending from the drop list, to designate an ascending or descending sort order.
Sorting Window
The components of the sorting window generated at run time can be modified here. In addition to the Title text and Status Bar Message, buttons can also be customized with a variety of options. Click here for additional help.
DynamicNamed
Valid for Report and Process only. This sort type is similar to DynamicSorting above, but is expanded here to allow groups of sort fields to be referenced by a single name. This is powerful with a generic report designed with no default key. Enter different Names, each one with different sort criteria. A single report can now be used for “on the fly” sorting based on the sort groups that you provide.
Name
Enter a group name to use to identify the sort sequence that you design.
Field
Use the ellipsis to select a field name from the Select Column dialog.
Order
Select Ascending or Descending from the drop list, to designate an ascending or descending sort order.
Sorting Window
The components of the sorting window generated at run time can be modified here. In addition to the Title text and Status Bar Message, buttons can also be customized with a variety of options. Click here for additional help.