Detailed Sort Overview
The SapphireOne Detailed Sort feature provides extensive additional options for sorting transaction records. This is achieved through the execution of sophisticated queries on your SapphireOne tables fields. Detailed Sort looks for records matching the criteria specified in your query and returns a selection of records for a given table query organised both alphabetically and numerically.
Detailed Sort Procedure


- From any transaction list within SapphireOne, select Detailed Sort from the Options menu.
- Select a field or multiple fields to be sorted by within the Available Fields panel.
- Using the right arrow, move the desired fields into the Ordered by Fields/Formulas panel.
- Your results will be sorted one row at a time, therefore the sort order of your fields will impact the results achieved. It is possible to drag each field into a new location in the hierarchy. Additionally the Direction (Arrow) button to the left of your chosen fields may be toggled from up to down by selecting it. The effect will be to influence….
- The Add formula options provide extensive capabilities to modify the existing sort behaviour or create a unique formula. Please refer to the following section.
- Once set up is complete select Sort. The following results relate to the example above.


Add or Modify a Formula
The Formula editor provides many shortcuts for writing formulas. You can click field names, operators and commands, as well as any project methods, to add them to the formula. When you click on an item, it is automatically displayed in the editing area where you can then modify it using standard cut/copy/paste functions. You can also enter items directly in the editing area or drag and drop them from the list of items.


The Formula editor contains the following areas:
- List of tables and fields – This area displays the fields of the table. The menu located above the list lets you set the fields to be displayed. You can use fields of the current table, those of related tables or those of all the tables.
- Note – Tables and fields with the Invisible property do not appear in the list. For more information about this property, refer to the “Attributes” section in Table properties and Field properties.
- Operators list – The operators list lets you choose the operators to be used in the formula. The operators are grouped into themes found in the menu located above the list.
- Commands list – The commands list contains the SapphireOne functions that can be used in formulas, as well as any project methods allowed by the developer. The menu located above the list lets you display the commands by theme or by alphabetical order. Refer to the SapphireOne Language Reference manual for a description of the SapphireOne commands that appear in this menu.
In principle, project methods that can be used in formulas must be declared beforehand using the SapphireOne set allowed methods command. However, by default, the Designer and Administrator of the database have complete access to the SapphireOne commands and user methods in the Formula editor. It is also possible to completely disable access control for all users. These options are set on the Security page of the Database settings.