Tutorial 24 - Transaction Procedures - Common Template

In this Tutorial you will learn how Procedures can add functionality and data entry efficiencies to the Common Transaction Template that you created in Tutorial 18. However, functionality and efficiencies are not the only motivators, it can also be convenience and that is a highly personal choice. You will recall that you added a View field (Account Name) to the Common Template and, consequently, to each Extra Template. This is a convenience field in that some of the Procedures display in it the progressive compound name of the Account (1st = Prefix; 2nd = Prefix + GL Account; 3rd = Prefix + GL Account + Subledger, if applicable) but then so does the Audit Trail panel (Tools > Audit trail in the Transaction Data Entry function); the difference is that the Audit Trail panel is a floating window whereas the View field is a fixed component of the Template. If you find the View field idea more convenient, then you have to provide the logic as part of all applicable Procedures (Prefix field, GL field, Subledger field (directly or indirectly - you will use the indirect route via the Description field), and Loading record) whereas the Audit Trail panel and its underlying logic is a STEP FORWARD system component. For the sake of learning this technique, you will be using the View field option in this Tutorial.



Exercise 24 - 1, Prefix Procedure (Field-based) for the Common Template
Create this Procedure:

1. Launch the Transaction Procedure editor.
2. Select Common > Prefix from the Open Procedure panel.
3. Drag the necessary objects from the Palette and complete.
The PrefixToText Function returns the name of a given Prefix segment. In this Tutorial the Prefix consists of only a single segment. The Prefix Name in the Function is a variable from the Palette. The [Account Name] shown in the Calculation box was click-selected from the Palette's Display only area in the Local Name section of the Main resources view.

Please note: When actually used in the Transaction Data Entry Procedure you can see the Account Name in the Audit Trail panel or the special View field in the Template for which you just completed the Prefix field Procedure:



Exercise 24 - 2, GL Procedure (Field-based) for the Common Template
Create this Procedure. The Retrieval object's Inspector settings are:
Retrieval: Single row
Search: GL Prefix = Prefix (from Local Resources).
GL Number = GL (from Local Resources).



Exercise 24 - 3, Description Procedure (Field-based) for the Common Template
After entering the GL Prefix in the Common Template, the Cursor will be placed into the Description field and "open up" the Subledger field, if the specified account (Prefix + GL) is a Control Account. The Procedure that you are about to configure will allow you to enter the name of the Subledger, in whole or in part, into the Description field and have the Procedure not only retrieve the name of the Subledger (or multiple options if more than one match is found) but the Subledger number as well.

Please note:
This Procedure is specific to the Common Template which uses the Misc Subledger Template, when applicable. Since all other Subledgers (Stock and Trade) are used in conjunction with Extra Templates (AR, its clone AP, and MERCH each of which has its own Description Procedure) you only have to test for the presence of the Misc Subledger Master in the AcctName table.

The Inspector settings for the first Misc Retrieval are:

Retrieval: Multiple rows (all), Stop and show switch is ON
Search: Description Like CIString
GL Account = GL
GL Prefix = Prefix
This narrows the Search down to finding a pattern match to the data entered into the Description field for the specified Account combination. If it finds a multiple match it will display the Retrieved Data panel listing all of the matches.

The Inspector settings for the second Misc Retrieval are:
Retrieval: Multiple rows (all), Stop and show switch is ON
Search: GL Account = GL
GL Prefix = Prefix
This limits the Search to the specified Account combination. Since no other Search Criteria is given, the Stop and show option will display the Retrieved Data panel listing all of the subledger accounts for the account combination (we are introducing you to this feature because of its usefulness in cases where the number of Subledgers for a given Control Account is relatively small; you may not want to use it in each and every subledger retrieval situation).

This Procedure addresses two issues, the retrieval of the Description of the three account components as well as the retrieval of the Subledger number. In a real-life setting you may elect to use the Audit Trail panel instead of the View field; however, you may still wish to implement the portion of this example that allows you to enter the name of the Subledger instead of trying to remember the Subledger number. This is how the two options look (we simply typed a y into the Description and found the Yellow Pages match):


Please note:
The retrieval of Yellow Pages in response to entering y in the Description field occurred on encountering the first Misc Retrieval in the Procedure. Had we entered z into the Description, the Procedure would have not found any match in the first Misc Retrieval and would have advanced to the second Misc Retrieval which would have caused the following Retrieved Data panel to be displayed, ready for selection (try this when testing your Common - Description Procedure):

While entering the name of the Subledger, in whole or in part, into the Description field is great for retrieving the appropriate Subledger number, it does drop the name of the Vendor in the Description field. Most people will probably prefer to have the Vendor name appear with each item in the Expense Account rather than repeating the Account name. You will deal with this issue in Tutorial 36. If you want to look at that Template and Procedure modification now, click on this link .



Exercise 24 - 4, Subledger Procedure (Field-based) for the Common Template
When connecting the fields as in this Template example (i.e. GL -> Description -> Subledger) combined with the Subledger retrieval of the Description Procedure, you can first of all enter the Subledger name into the Description field and automatically load the Subledger number; or, you can tab through the Description field into the Subledger field and enter the Subledger Number and load the Subledger name into the Description - provided you configure this Procedure:



Exercise 24 - 5, Loading record Procedure (Template-based) for the Common Template
This Procedure is needed since none of the data shown in the Account Name View field is saved. Thus, on loading the record this Procedure retrieves the various account descriptions to concatenate them for display in the Account Name field:



Go To
  Tutorial 25 - Transaction Procedures for the Extra Transaction Templates
  Index