CellExists (open)

Check if a cell exists in a record

Syntax

// Core function, no LOADLIB necessary

BOOLEAN FUNCTION CellExists(RECORD rec, STRING cellname)

Parameters

RECORD rec

Record to read

STRING cellname

Name of the cell to look for

Return value

BOOLEAN

True if a cell with name @italic cellname exists in record @italic rec, false if it does not exist or if the record does not exist.

Description

This function checks if the record contains a cell with the specified name. Cell names are case-insensitive

Examples

// Ensure that the cell 'title' exists in the record
RECORD myfile := FindFile(15);
IF (NOT CellExists(myfile,"title"))
  Print ("The files table is broken or file 15 does not exist!");