Sample Procedures

Background to this mini-tutorial:
The database being used includes these tables:

In this example, Names and Addresses are stored in the Names (Global) table (except for City, State, and Country which are derived from another Global table).  The Names table contains Prospects, Customers, and Vendors. The Subledger table maintains master records for Customers and Vendors (containing linked data from the Names table and local data dealing with payment terms, method of payment, etc.).

The purpose of this Procedure is to enable the user to enter the Amount, Prefix, (the GL Number 302 is predetermined through Sources) and then enter the Vendor's Name in whole or in part into the Description. The Procedure, triggered by disturbing the Description field, will then follow these sequential phases, as necessary:

This Procedure is triggered by the Description field of this Transaction Template:

Cursor Movement and Template selection
Amount > GL Prefix > GL Number. We recommend these three fields as the first data entry fields in the "Common" Transaction template as the data contained in these three fields determines which Extra fields are needed for the transaction in progress. Any required change in transaction template will happen automatically. The fourth field in our example is the Description field which will trigger the Description Procedure.

Please Note:
In our example, we have used a single database table based on the AR Template to hold both Customer (Accounts Receivable) and Vendor (Accounts Payable) master data. To handle the various Source Documents (e.g. Accounts Payable Invoices, Credit Notes, and Payments) which may require unique data entry Procedures, we developed clones of the AR Base Template (the template that establishes the structure of the underlying database table). In this specific example, the Title bar of the template reads API (AR) Transaction Template Workspace which indicates the:

Note the same format in the Title bar of the Procedure.


The Description Procedure
The Procedure carries out up to two phases to enter the Vendor information into the transaction record.

Explanations to the Procedure

For the sake of visual ease, we have inserted Phase markers in the Procedure's Workspace. This Procedure is aborted in the event that the "GL Number" is not 302 (see the first Conditional object.

Phase 1:
This phase of the Procedure utilizes the following executable objects:

Phase 2:
This phase of the Procedure utilizes the following executable objects:

Subject to the accuracy and uniqueness of the text string that was entered into the Description field, you are now reasonably certain that the Name in question is not saved in the Names/Trade tables combination. To enter a new Name while in the middle of an Accounting Data Entry,

 


Testing the Procedure
The following example shows the Testing of the Procedure showing the successful completion of Phase 1.

On exiting the Procedure, the Test Transaction Data Entry window will be re-displayed with the specified fields filled in and the cursor advanced to the next input field:

If you would test this Procedure in a live setting, you would repeat the Test for each possible combination i.e. enter a name into the Description field that you not have in the Trade table but is set up in the Names table (to test Phase 2).

Go to:
Index
Table of Contents