Procedure Integrity Table

General structure

User-defined Functions, Procedures, Reports and Processes often make use of the data fields defined in Global, Subledger and Transaction Templates. When an attribute of such a field changes (e.g. the user name or the data type), the procedure that relied on the data field being of a specific makeup may become invalidated.

Also, a Report mey become invalidated if one of the Print Templates used in it changes in the way that makes it incompatible with the Report (e.g. the Template's composition of print fields changed).

These dependencies are tracked by SF_SYSProcedureIntegrity table. This table maintains the lists of all trigger fields used by STEPforward, and other parameters that the procedures are dependent on, and has the following structure:

Column Generalized data type Use
SF_ProcedureName VARCHAR(20) Name of the Procedure
SF_Type CHAR(1) Type of the Procedure (Function, Report etc.)
SF_TriggerType CHAR(1) Type of trigger that fires the Procedure
SF_TriggerFieldName VARCHAR(30) Name of trigger field (for trigger type F)
SF_IdNumber SMALLINT Id number of the trigger field
SF_TemplateName VARCHAR(8) Name of Template that the Procedure is attached to
SF_Domain CHAR(1) Type of dependency (M, T, F or P)
SF_CloneName VARCHAR(8) Name of Clone that the Procedure is attached to
SF_TemplateType CHAR(1) Base or clone Template
SF_TimeStamp SMALLINT Version of the row (incremented with each update)

Notes:

The table contains one row that relates the procedure (i.e. Function, Report, Template Procedure or Process) and trigger that it depends on.

SF_ProcedureName is a name of the Function, Report or Process. In the case of Template Procedures, SF_ProcedureName is the name of the Template the Procedure is attached to.

SF_Type is the category the Procedure belongs to. SF_Type of Global and Subledger Procedures is set to M; type of Transaction Procedures is T. For Functions, Reports and Processes the type codes are F, R and P respectively.

SF_TriggerType is the type of the Template trigger that fires the Procedure. The following trigger types are defined in STEPforward:

F - trigger is a data field or a button
I - Procedure is fired when the data entry window is set to the new record mode
L - Procedure is fired when the existing record is loaded into the data entry window
Q - Procedure is fired when the cheque is generated in Transaction Data Entry
S - Procedure is fired when the record is saved
P - Procedure is fired when the transaction document is posted
E - Procedure is fired when the transaction record is entered
D - Procedure is fired when the record is deleted

SF_TriggerFieldName - system name of the field that triggers the Procedure. If the SF_TriggerType is not F, SF_TriggerFieldName is set to an empty string.

IdNumber is the id number of the data field that the procedure depends on (i.e. whose current attributes cannot change without invalidating the procedure).

SF_TemplateName is the name of the Template that houses the data field that the procedure depends on (see description of SF_IdNumber above), or the name of the Function or Print Template, as set in the SF_Domain code (see below).

SF_Domain determines the origin of dependency for the given procedure. The following domain codes are defined in STEPforward:

M - procedure is dependent on the Global or Subledger Template
T - procedure is dependent on the Transaction Template
F - procedure is dependent on the Function
P - Procedure is dependent on the Print Template

SF_CloneName is the name of the Template clone that houses the data field that the procedure depends on (sse description of SF_IdNumber above).

SF_TemplateType is a one-character code that marks the Template as being of the base (B) or clone (C) type.

The following is a partial sample of contents of SF_SYSProcedureIntegrity table:

SF_ProcedureName     SF_Type SF_TriggerType SF_TriggerFieldName SF_IdNumber SF_TemplateName      SF_Domain
-------------------- ------- -------------- ------------------- ----------- -------------------- ---------
Names                M       F              Set_Id              8           Names                M
TSICompact           F                      NULL                0           TotalSinceInception  F
Common               T       I                                  0           DocumentName         F
ARTXC                T       F              SF_Amount           0           DocumentName         F
ARTXI                T       F              SF_Amount           0           DocumentName         F
ARTXI                T       F              SF_DocumentDate     51          AR                   M
ARTXI                T       F              SF_DocumentDate     52          AR                   M
ARTXP                T       I                                  0           DocumentName         F
PTXC                 T       F              SF_Amount           0           DocumentName         F
PTXI                 T       Q                                  53          AP                   M
PTXI                 T       F              SF_Amount           0           DocumentName         F
PTXI                 T       F              SF_DocumentDate     51          AP                   M
PTXI                 T       F              SF_DocumentDate     52          AP                   M
Names                M       S                                  8           Names                M
GenJournal           R                                          0           AccountingPeriod     F