The following procedure will add and configure a tSortRow component to sort the aggregation result.
addComponent { setComponentDefinition { TYPE: "tSortRow", NAME: "tSortRow_1", POSITION: 672, 192 } }Copy code to clipboard
addComponent { setComponentDefinition { TYPE: "tSortRow", NAME: "tSortRow_1", POSITION: 672, 192 } }
This example will rearrange the aggregation result by sorting the total scores in the descending numerical order.
setSettings { CRITERIA { COLNAME : "sum", SORT : "num", ORDER : "desc" }, LABEL : "sort" }Copy code to clipboard
setSettings { CRITERIA { COLNAME : "sum", SORT : "num", ORDER : "desc" }, LABEL : "sort" }
In this example, the tSortRow component must have the same schema structure of the tAggregateRow component.
addSchema { NAME: "tSortRow_1", CONNECTOR: "FLOW" addColumn { NAME: "subject", TYPE: "id_String" } addColumn { NAME: "sum", TYPE: "id_Double", PRECISION: 2 } addColumn { NAME: "average", TYPE: "id_Double", PRECISION: 2 } addColumn { NAME: "max", TYPE: "id_Double", PRECISION: 2 } addColumn { NAME: "min", TYPE: "id_Double", PRECISION: 2 } }Copy code to clipboard
addSchema { NAME: "tSortRow_1", CONNECTOR: "FLOW" addColumn { NAME: "subject", TYPE: "id_String" } addColumn { NAME: "sum", TYPE: "id_Double", PRECISION: 2 } addColumn { NAME: "average", TYPE: "id_Double", PRECISION: 2 } addColumn { NAME: "max", TYPE: "id_Double", PRECISION: 2 } addColumn { NAME: "min", TYPE: "id_Double", PRECISION: 2 } }
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!