ReorderRows (open)
Reorders elements within an array
Syntax
LOADLIB "mod::tollium/lib/helpers.whlib";
RECORD ARRAY FUNCTION ReorderRows(RECORD ARRAY reorderrows, VARIANT tomove, STRING whereto, RECORD options)Parameters
RECORD ARRAY reorderrowsRows to reorder, ordered by current ordering
VARIANT tomoveRowkey/array of rowkeys of rows to move
STRING wheretoWhere to move to ('begin', 'end', 'top', 'bottom', 'position')
RECORD optionsOptions
coalesceCoalesce all moved rows into one block (defaults to TRUE)
outputnameCell to place the new ordering in (default: 'ordering'). Set to empty to reorder the source array.
positionkeyRowkey of the row to move to in move mode 'position'
rowkeynameName of field containing the rowkey, defaults to 'rowkey'
Return value
RECORD ARRAYReordered rows, with the new ordering in the cell named by options.outputname