ROW( { fields } , recstruct )

ROW( row , resultrec )

ROW( [ row , ] transform )

fieldsA comma-delimited list of data values for each field in the recstruct, contained in curly braces ( {} ).
recstructThe name of the RECORD structure defining the field layout.
rowA single row of data. This may be an existing record, or formatted in-line data values like the fields parameter description above, or an empty set ( [ ] ) to add a cleared record in the format of the resultrec. If omitted, the record is produced by the transform function.
resultrecA RECORD structure that defines how to construct the row of data, similar to the type used by TABLE.
transformA TRANSFORM function that defines how to construct the row of data.
Return:ROW returns a single record.

The ROW function creates a single data record and is valid for use in any expression where a single record is valid.

ROW Form 1

The first form constructs a record from the in-line data in the fields, structured as defined by the recstruct. This is typically used within a TRANSFORM structure as the expression defining the output for a child dataset field.


AkaRec := {STRING20 forename,STRING20 surname};
outputRec := RECORD
  DATASET(AkaRec) kids;
inputRec := {UNSIGNED id,STRING20 forename,STRING20 surname};
inPeople := DATASET([{1,'Kevin','Halligan'},{1,'Kevin','Hall'},
outputRec makeFatRecord(inputRec L) := TRANSFORM :=; := DATASET([{ L.forename, L.surname }],AkaRec);
fatIn := PROJECT(inPeople, makeFatRecord(LEFT));
outputRec makeChildren(outputRec L, outputRec R) := TRANSFORM :=; := + ROW({[1].forename,[1].surname},AkaRec);
r := ROLLUP(fatIn, id, makeChildren(LEFT, RIGHT));