FormDataCollection.Sort

Syntax:

Sort(<Columns>, <ObjectOfComparison>)

Parameters:

<Columns> (optional)

Type: String.
List of column names separated by commas by which the table will be sorted. Each column name may be followed by a space and a sort direction specification. The direction is defined as follows: "Desc" - sort in descending order, "Asc" - sort in ascending order. By default, the ascending sort order is used. The order of table column names determines the sorting order. This means that the table is initially sorted by the first specified column. Then groups of rows with the same value in this column are sorted by the second column, etc.

<ObjectOfComparison> (optional)

Type: String; CompareValues.
Object for comparing elements or name of such object's type. If no object of comparison or type name is specified, the comparison is performed according to the following rules:
    • Elements of different types are compared by the type code;
    • Simple type elements are compared by the value;
    • Other type elements are compared by the string presentation.
Note: objects for comparing elements are unavailable on the client, so it is necessary to specify the object type name there.

Description:

Sorts a collection according to specified sorting rules.

Availability:

Thin client, web-client, server, thick client, Mobile application (client), Mobile application (server).
Calling the method executes a server call.

    

1C:Enterprise Developer's Community