Procedures Table
General structure
Template Procedures are stored in SF_SYSProcedures table. Each row of this table contains a complete definition of the Procedure, including the executable object of the Procedure in an archived form.
The table has the following structure:
Column | Generalized data type | Use |
TemplateName | VARCHAR(8) | Name of Template that the Procedure is attached to |
CloneName | VARCHAR(8) | Name of Clone that the Procedure is attached to |
Type | CHAR(1) | Template type (Base or Clone) |
DescriptionText | BLOB | Archived text of the Function's description |
Domain | CHAR(1) | Domain of the Template (M or T) |
TriggerType | CHAR(1) | Type of trigger that fires the Procedure |
TriggerFieldName | VARCHAR(30) | Name of trigger field (for trigger type F) |
ProcedureVisual | BLOB | Archived graphical flowchart of the Procedure |
ProcedureExec | BLOB | Archived executable object |
ProcedureIsValid | LOGICAL | Flag to track readiness of the Procedure |
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 Procedure used by STEPforward.
TemplateName is a name of the Template that the Procedure belongs to. The Procedure is fired through the action initiated by one of the Template's triggers (see below).
CloneName is the name of the Template clone. If Type is B, CloneName is set to an empty string.
Type is a one-character code that marks the Template as being of the base (B) or clone (C) type.
DescriptionText is an archived NSString object extracted from NSText that displays the Procedure's legend.
Domain is a one-character code that identifies the Template as belonging to the category of the accounting transaction data (T) or general data (M) which includes both Global and Subledger categories.
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.
ProcedureVisual is an archived SFVisualTemplate object that encapsulates the contents of the Workspace window when the Procedure is constructed. When the Procedure is loaded into the Procedure Builder, its Workspace, Palette and Inspector windows are populated from this object that is unarchived for this purpose.
ProcedureExec is an archived object that stores executable objects that implement the logic of the Procedure. The objects are linked together in a chain of references and are executed at the run time.
ProcedureIsValid is a logical flag that is set to FALSE if the Procedure has been saved with syntactical errors. In this case ProcedureExec field is set to NULL, and the Procedure cannot be executed.
The following is a partial sample of contents of SF_SYSTemplates table:
TemplateName CloneName Type Domain TriggerType TriggerFieldName
------------ --------- ---- ------ ----------- ------------------------------
AP T S
AP APadj C T I
AP APCheck C T Q
AP T F SF_Amount
AP T F SF_Description
AP T F SF_DocumentDate
AP T F SF_DocReferenceNo
AP T F SF_SubledgerNumber
AR T F SF_DocumentDate
AR ARPAY C T F SF_DocumentDate
BankRec M F Date_Cleared
BankRec M F loadBankData
CardFile M I
CardFile M L
CardFile M S
CardFile M F Day_1
CardFile M F company
CardFile M F For_Employee
CardFile M F compound_product_code
Common T D
Common T S
Common T F SF_GLPrefix
Common T F SF_Description
Customer M I
Customer M S
Customer M F Contract_Start
Customer M F Rugs_Price_Modifier
Customer M F Contract_Term_in_years
Customer M F Garments_Price_Modifier
Customer M F Flat_Goods_Price_Modifier
Delete M I
Delete M L
Delete M S
Invoice M I
Invoice M L
Invoice M S
PCodes M F Product_ID
PCodes M F color_code
PCodes M F Package_Cost
PINVCr T F SF_Description
PINVmer T L
PINVmer T F Product_ID
PINVmer T F Quantity_Purchased
PINVrent T L
PINVrent T S
PINVrent T F Product_ID
PINVrent T F Quantity_Purchased
Payroll T S
Rentals T I
Rentals T L
Rentals T S
Rentals T F Load
Rentals T F SF_GLNumber
Rentals T F SF_DocReferenceNo
Rentals T F Quantity_Purchased