User Functions Table

General structure

User-defined functions are stored in SF_SYSUserFunctions table. Each row of this table contains a complete definition of the Function, including the executable object of the Function in an archived form.

The table has the following structure:

Column Generalized data type Use
FunctionName VARCHAR(20) Name of the user-defined Function
DescriptionText BLOB Archived text of the Function's description
FunctionVisual BLOB Archived graphical flowchart of the Function
Parameters BLOB Archived array of the Parameter objects
ReturnType INT Data type of the return variable
ReturnVariable VARCHAR(255) Name of the return variable
FunctionExec BLOB Archived executable object
FunctionIsValid LOGICAL Flag to track readiness of the Function
SF_UserId VARCHAR(255) Login account of the user that last updated the row
SF_DateChanged CHAR(8) Date of the last update of the row (CCYYMMDD)
SF_TimeChanged CHAR(6) Time of the last update of the row (HHMMSS)
SF_TimeStamp SMALLINT Version of the row (incremented with each update)

Notes:

The table contains one row for each user-defined Function used by STEPforward.

DescriptionText is an archived NSString object extracted from NSText that displays the Function's legend.

FunctionVisual is an archived SFVisualTemplate object that encapsulates the contents of the Workspace window when the Function is constructed. When the Function is loaded into the Function Builder, its Workspace, Palette and Inspector windows are populated from this object that is unarchived for this purpose.

Parameters is an archived NSArray object that stores objects carrying information about parameters accepted by the Function.

ReturnType is the integer data type of the returned value. Functions that do not return any value have this field set to -1.

FunctionExec is an archived object that stores executable objects that implement the logic of the Function. The objects are linked together in a chain of references and are executed at the run time.

FunctionIsValid is a logical flag that is set to FALSE if the Function has been saved with syntactical errors. In this case FunctionExec field is set to NULL, and the Function cannot be executed.