SORT

Description

Sorts the entries of the given parameter in ascending order.

SORT(Scalar<any>)

SORT(scalar: Scalar<any>): Scalar<any>

Sort the entries of the given Scalar<any> in ascending order.

Parameters

ParameterDescription

scalar

A scalar of type any

Returns

Returns the given scalar sorted in ascending order as type Scalar<any>.


SORT(Vector<any>)

SORT(vector: Vector<any>): Vector<any>

Sort the entries of the given Vector<any> in ascending order.

Parameters

ParameterDescription

vector

A vector of type any

Returns

Returns the given vector sorted in ascending order as type Vector<any>.


SORT(GroupedScalar<any, any> [, Scalar<Text>])

SORT(group: GroupedScalar<any, any> [, by: Scalar<Text>]): GroupedScalar<any, any>

Sort the entries of the given GroupedScalar<any, any> in ascending order by values.

Parameters

ParameterDescription

group

A GroupedScalar of type <any, any>

by

The by parameter is optional.

Specifies by which attribute of the vector it should be sorted.Allowed values are byGroupKey and byGroupValue.

Default is byGroupValue.

Returns

Returns the given group sorted by the specified property in ascending order as type GroupedScalar<any, any>.


SORT(GroupedVector<any, any> [, Scalar<Text>])

SORT(group: GroupedVector<any, any> [, by: Scalar<Text>]): GroupedVector<any, any>

Sort the entries of the given GroupedVector<any, any> in ascending order by values.

Parameters

ParameterDescription

group

A GroupedVector of type <any, any>

by

The by parameter is optional.

Specifies by which attribute of the vector it should be sorted.Allowed values are byGroupKey and byGroupValue.

Default is byGroupValue.

Returns

Returns the given group sorted by the specified property in ascending order as type GroupedScalar<any, any>.

Examples

Sort GridPowerConsumption in ascending order.

SORT($GridPowerConsumption)

Sort GroupedByDevicePowerConsumption in ascending order by event

SORT($GroupedByDevicePowerConsumption, byGroupKey)

Last updated

© 2023 MOOST AG