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 reorderrows
Rows to reorder, ordered by current ordering
VARIANT tomove
Rowkey/array of rowkeys of rows to move
STRING whereto
Where to move to ('begin', 'end', 'top', 'bottom', 'position')
RECORD options
Options
coalesce
Coalesce all moved rows into one block (defaults to TRUE)
outputname
Cell to place the new ordering in (default: 'ordering'). Set to empty to reorder the source array.
positionkey
Rowkey of the row to move to in move mode 'position'
rowkeyname
Name of field containing the rowkey, defaults to 'rowkey'
Return value
RECORD ARRAY
Reordered rows, with the new ordering in the cell named by options.outputname