CellDelete (open)
Remove a cell from a record
Syntax
// Core function, no LOADLIB necessary
RECORD FUNCTION CellDelete(RECORD rec, STRING cellname)
Parameters
RECORD rec
Record to modify
STRING cellname
Cell to remove
Return value
RECORD
The record with the requested cell removed. Unlike the DELETE CELL statement, this function does not modify the original record passed in 'cellname'
Description
CellDelete removes the specified cell from the record. Cell names are case-insensitive. CellDelete can be used to delete cells with a dynamically generated name. If the cell does not exist in @italic rec, nothing happens and no error is generated.
Examples
// Retrieve a file record, and remove the 'title' column
RECORD myfile := FindFile(15);
myfile := CellDelete(myfile,"title");
// Rename the cell 'name' to 'title'
INSERT CELL title := myfile.name INTO myfile; //copy
title := CellDelete(myfile,"name"); //and remove