CellInsert (open)

Insert a cell in a record

Syntax

// Core function, no LOADLIB necessary

RECORD FUNCTION CellInsert(RECORD rec, STRING cellname, VARIANT value)

Parameters

RECORD rec

Record to modify

STRING cellname

Name of the cell to insert

VARIANT value

Value for the cell

Return value

RECORD

The record with the new cell inserted. Unlike the INSERT CELL statement, this function does not modify the original record passed in 'cellname'

Description

CellInsert inserts the specified cell in the record. Cell names are case-insensitive. CellInsert can be used to insert cells with a dynamically generated name. If the cell already exists in @italic rec, an error is generated.

Examples

// Insert a mydata cell into a file record
RECORD myfile := FindFile(15);
myfile := CellInsert(myfile, "mydata", "Hello, World!");