Przejdź do głównej zawartości

SortTable

This function will sort specified table with values from specified fields.

SortTable("tableName","fieldName",["fieldName"]);
  • tableName – (String) Table name
  • fieldName – (String) The name of the field to sort. You can pass as many fields as you want. The sort direction asc | desc can be specified after the field name (defaults asc).

This function returns Boolean. This function returns true if any rows changes its index, otherwise returns false

Example 1: Sort Orders table by values in Type column

SortTable("Orders","Type");

Example 2: Sort Orders table by values in Type and Symbol columns.

SortTable("Orders","Type","Symbol");