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 |
ProcedureName | VARCHAR(20) | Name of the Procedure |
Type | CHAR(1) | Type of the Procedure (Function, Report etc.) |
TriggerType | CHAR(1) | Type of trigger that fires the Procedure |
TriggerFieldName | VARCHAR(30) | Name of trigger field (for trigger type F) |
IdNumber | SMALLINT | Id number of the trigger field |
TemplateName | VARCHAR(8) | Name of Template that the Procedure is attached to |
Domain | CHAR(1) | Type of dependency (M, T, F or P) |
CloneName | VARCHAR(8) | Name of Clone that the Procedure is attached to |
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.
ProcedureName is a name of the Function, Report or Process. In the case of Template Procedures, ProcedureName is the name of the Template the Procedure is attached to.
Type is the category the Procedure belongs to. 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.
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 |
TriggerFieldName - system name of the field that triggers the Procedure. If the TriggerType is not F, 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).
TemplateName is the name of the Template that houses the data field that the procedure depends on (see description of IdNumber above), or the name of the Function or Print Template, as set in the Domain code (see below).
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 |
CloneName is the name of the Template clone that houses the data field that the procedure depends on (sse description of IdNumber above).
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:
ProcedureName Type TriggerType TriggerFieldName IdNumber TemplateName 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