ToRecordArray (open)

Converts a list of values to a record array with in every record a cell with one of the values.

Syntax

// Core function, no LOADLIB necessary

RECORD ARRAY FUNCTION ToRecordArray(VARIANT elements, STRING cellname)

Parameters

VARIANT elements

List of values

STRING cellname

Name of cell to put the values in

Return value

RECORD ARRAY

The list of records

Description

ToRecordArray takes a list of values (eg. string array). For every value in that list, a record is created, with one cell per record containing that value. The list of that records is then return.

Examples

// Get record array ith one record per value
RECORD recarr := ToRecordArray([ 1, 2, 3 ], "val");

// Recarr now contains [ [ val := 1 ], [ val := 2 ], [ val := 3 ] ]