This is the documentation for ConfiForms Server/Data Center app
Using sorting and limiting the number of records returned
Supports ASC and DESC directions, syntax is similar to SQL syntax, and the ordering rules must be coma separated.
Order directions ASC and DESC are case-sensitive!
To limit the number of records returned a LIMIT operator is used.
You can also use a predefined macro parameter for limiting records count returned
- Example: f1 ASC, f2 DESC - will sort the dataset by f1 field values in ASC order and by f2 in DESC order
- Example2: f1 ASC, f2 DESC LIMIT 2 - will sort the dataset by f1 field values in ASC order and by f2 in DESC order and limit the number of records returned to 2
- Example3: LIMIT 2 - will limit the number of records returned to 2
- Example4: created DESC - will sort by record's date created in descending order
ConfiForms (from version 1.16+) supports complex fields in sorting, like to sort ascending by dropdown's label (assuming a field is called "myDropdown")
You can sort by field values transformed with Virtual functions, as well as by more complex expressions and sub properties.
More about fields and properties can be found here: Accessing field values and properties
It is important to understand that the data stored in ConfiForms is associated with the field type (ConfiForms Field Definition).
And the sorting behaviour is applied according to the ConfiForms Field Definition type. With one exception: for Masked fields - where the user can specify in-out formats and force the field value to be treated as given type