Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Expression_function



Panel
titleDescription
 Returns a new dataset based on the rows in the given dataset. Sort order is natural if the Class of keyColumn implements java.lang.Comparable, otherwise sorting is done by the toString() value.


Panel
titleSyntax

 sortDataset(dataset,

keyColumn, [ascending])

colIndex[, ascending])

  • Parameters

DataSet dataset - The starting dataset.

int colIndex - The index of the column to sort on.

Bool ascending - Optional. A flag indicating whether or not to sort ascending.

  • Results

DataSet - A sorted dataset


Panel
titleSyntax

 sortDataset(dataset, colName[, ascending])

  • Parameters

DataSet dataset - The starting dataset.

int colName- The name of the column to sort on.

Bool ascending - Optional. A flag indicating whether or not to sort ascending.

  • Results

DataSet - A sorted dataset


Panel
titleExamples


 sortDataset
Code Block
languageactionscript3
titleCode Snippet
sortDataset(dataset, 0, true) // returns a Dataset sorted ascending on column 0.


 sortDataset
Code Block
languageactionscript3
titleCode Snippet
sortDataset(dataset, "Column 1", false) // returns a Dataset sorted descending on the column named "Column 1".


...