4D v14.3ORDER SUBRECORDS BY |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
ORDER SUBRECORDS BY
ORDER SUBRECORDS BY
Subtables are no longer supported starting with version 11 of 4D. A compatibility mechanism ensures the functioning of this command in converted databases; however, it is strongly recommended to replace any subtables with standard related tables. ORDER SUBRECORDS BY sorts the current subselection of subtable. It sorts only the subselection of the subtable contained in the current parent record. The direction parameter specifies whether to sort subfield in ascending or descending order. If direction is the “greater than” symbol (>), the subrecords are ordered in ascending order. If direction is the “less than” symbol (<), the subrecords are ordered in descending order. You can specify more than one level of sort by including more subfields and sort symbols. After the sort is completed, the first subrecord of the sorted subselection is the current subrecord. Sorting subrecords is a dynamic process. Subrecords are never saved in their sorted order. If neither a current record nor a higher-level subrecord exists, ORDER SUBRECORDS BY has no effect. If a form contains a subform that is to be printed in a fixed frame, this command needs to be called just once before printing in the Before phase of the parent form method. The following example sorts the [Stats]Sales subtable into ascending order, based on the SalesDollars subfield: ORDER SUBRECORDS BY([Stats]Sales;[Stats]Sales'Dollars;>) |
PROPERTIES
Product: 4D
HISTORY
Modified: 4D v11 SQL SEE ALSO ARTICLE USAGE
4D Language Reference ( 4D v12.4) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||