Sorts Overview
By default, Open Plan displays activities and resources in barchart and spreadsheet views in order of ID.
Open Plan provides pre-defined sorts common to many project management reports. Use Sorts to assign a different sorting sequence to a view depending on your needs.
You can utilize sorts in a number of ways:
- Pre-defined sorts: You can apply the general sorts available on the Sorts Dialog Box to a project view.
- Custom sorts: You can define custom sort expressions that you can apply to views. The sorts that you define are stored in the database and can be shared with your team.
- Temporary sorts: You can create temporary sorts when the specific sorting sequence you need is not likely to be used again.
- Sorts on a multi-table spreadsheet: You can apply sorts to a secondary table in the Spreadsheet Preferences dialog box.
- Sorts for outlining or grouping in spreadsheet or barchart views: You can sort activities within the outline or group structure if outlining is enabled or groups are defined.
Default Sort Order Rules
The following rules apply to the default sort order:
- Hierarchical fields: The default sort order for all hierarchical fields (for example, Activity IDs, Resource IDs, and codes) is interpreted numerically when possible. For example, 1.2 is sorted before 1.10.
- Character data: Open Plan sorts character data alphabetically.
- Mixed characters and numeric data: Mixed characters and numeric data is sorted alphabetically, except for trailing numeric digits which are sorted numerically. For example, A2 comes before A10. Since each component of the name is sorted independently, some data can be numeric and some not.
- IDs with leading zeros: IDs with leading zeros are sorted first. For example, A01 comes before A1.
When you have a table based on a hierarchy, Open Plan enables the Reapply Filter and Sort option on the Edit tab even when there is no sort or filter specified.
The rules for the sort order are fundamental to the workings of the automatic numbering and indent/outdent features.
Sorts in Spreadsheets
You can sort the data in a spreadsheet based on either a single column or on multiple columns. In barchart view, the sort you applied on the spreadsheet pane also reflects in the barchart pane of the views.
Sorts Status
You can use a different sort for each project view. When a sort is in effect, the sort name displays in the status bar at the bottom of the Open Plan window. If you hover your mouse cursor over a sort, Open Plan displays the details of that sort as a tool tip.
Additional Sort Options
The following sort options are available on the Edit tab in the Sorts menu group:
- Reapply: Select this option to apply the last sort again.
- Manage: Select this option to display the Sorts Dialog Box where you can create, copy, edit, and delete sorts.
- Clear: Select this option to remove the currently selected sort. It is the same as opening the Sorts Dialog Box and selecting <Cancel Sort>.
Custom Sorts
You can define custom sort expressions that you can apply to views. These custom expressions are based on any field from an activity or resource-related data table and can feature complex expressions using logical operators and parentheses.
In addition to allowing you to name and save sorts for future use, Open Plan allows you to create and use "on-the-fly" sorts for the following:
- Import scripts
- When defining a link using the Spreadsheet Preferences dialog box
- OLE automation
You can use the Sort Expression dialog box to edit the sort, or you can enter the sort expression directly into the field.
When you create a new sort, Open Plan displays the New Sort dialog box where you can enter a sort name and indicate the source of the sort fields. After you have entered a name and selected a data table, Open Plan allows you to define the sort expression using the Sort Expression dialog box. With this dialog box, you can build a sort expression by indicating each sorting field and whether Open Plan should use an ascending or a descending order when sorting activities using that field. Use the Share this Item with Others option to share your sort with your team.
You can designate pre-defined or custom sorts as favorites. Click the Edit tab and click Favorites in the Sorts menu group, or use the Organize Favorites dialog box to add, remove, or rearrange favorite items.
Sort Expression Syntax
The syntax for a sort expression is:
<sort_field1>,<sort order>|<sort_field2>,<sort order>|…
where:
- Each of the <sort_fieldx> values is either the name of an existing field on the appropriate table or the definition of a calculated field for that table.
- The sort order indicates an ascending (0) or a descending (1) sort.
- The piping symbol (|) separates the sorts you create.
For example, the following expression:
ORIG_DUR,0|ACT_ID,1
sorts the Original Duration field in ascending order and within that, sorts the Activity ID field in descending order.
You can define sort expressions based on a substrings of a text field (for example, the activity description) by creating a calculated field containing the substring and including the calculated field in the sort expression.