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 recRecord to modify
STRING cellnameName of the cell to insert
VARIANT valueValue for the cell
Return value
RECORDThe 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!");