Tutorial 32 - Working with the Detail Object

In this and the next two Tutorials you will be working with the Detail object. In this Tutorial you will be configuring a Global Template and its Procedures. The Template will contain local fields, linked fields, and a Detail object. The purpose of this Template is to accept merchandise orders as part of General Data Entry. In Tutorial 33 you will be configuring a Report that will print Orders/Invoices based upon the data captured with the Template which you are about to create.

 

Exercise 32 - 1, Configure a Global Template with Detail object
The compactness of the fields does not permit showing all the connecting lines which establish the cursor movement; we will list the order of the fields as part of the explanations.

1. Launch the Global Templates editor.
2. Drag in all necessary fields based on these specifications and arrange them as per example shown above (all Security settings should be Read & write, or Read only as applicable); System name and User name are identical unless otherwise stated; Input action is abbreviated as IA; Styles as per examples, Alignments are specified:
a Logo object (if you wish to include one);
Linked fields from the Names table (select the Palette's Names view):
Salutation
First Name
Last or Corporate Name
Address
City
St/Pr
Zip
Country
Numeric ID (change User name to Customer ID)
Grab from General list (select the Palette's General list view):
System Name: Terms_Code; IA: Lock; Alignment: |-><-|
System Name: Payment_Method; set Lists to None; IA: Lock; unbold title; Alignment: |<-|
View fields:
System Name: Order_Total; User Name: Total; Data type: Money, 2 decimal places; Alignment: |->|
System Name: Print_Button; User Name: Print; Data type: Text; Style: button (left option under Field
border); Alignment: |->|
Data fields (local) defined as follows:
System Name: Document_Date; User Name: Date; Data type: Date; IA: Suggest; Alignment: |<-|
System Name: Invoice_Number; User Name: Invoice #; Data type: 4 byte Integer; IA: Lock;
Alignment: |-><-|
System Name: Status; Data type: Text keep default; IA: Lock; Alignment: |-><-|
System Name: Tx_Number; Data type: 4 byte Integer; IA: Lock; Alignment: |-><-|
Detail field - comes loaded with three Data fields, (double-click Detail object to weld it to the Workspace):
System Name: Quantity; Data type: 2 byte Integer; IA: Ask; Alignment: |->|
System Name: Unit Price; Data type: Money, 2 decimal places; IA: Lock; Alignment: |->|
System Name: Product_Total; Data type: Money, 2 decimal places; IA: Lock; Alignment: |->|
Drag the following two fields from the General List and drop them into the Detail object, check the
Mandatory input switch (Yes), in both cases:
System Name: Product_Code; Data type: Subledger #, Size 10 Num; IA: Ask; Alignment: |->|
System Name: Product_Name; Data type: Text; IA: Ask; Alignment: |<-|

3. Connect the fields for cursor movement:
Date > Customer ID > First Name > Last or Corporate Name > Address > City > St/Pr > Zip > Country > Detail object (only editable fields are connected).

4. Save - Name: SalesPO; Description: Sales Order.

 
Exercise 32 - 2, Configure ten Global Procedures
All ten Procedures will be attached to the SalesPO Template. Most settings are obvious, so follow the examples closely. Inspector settings for the Retrieval objects are either shown as text adjacent to the object or defined below the Workspace example. Unless otherwise indicated, the Exit Inspector settings are the default. Our example Procedures are shown in the order in which they appear in the Procedure column of the Open Procedure panel. To create each of the Procedures:

1. Launch the Global Procedures editor.
2. Select the appropriate Procedure trigger from the Procedure column of the Open Procedure panel.
In the event that you have looked at the sample database, you may have noticed that there is an 11th Procedure (attached to Print in the Trigger-based section of the Procedure column). You will configure this Procedure as part of Tutorial 33.

 




Please Note:
This Procedure attempts to validate the presence of the Customer ID in the Trade table and retrieve the Terms Code and the Payment Method of the specified Customer. However, this Customer ID Procedure will only be activated if the entered Customer ID finds a precise match. If no match is found, possibly because of an error in typing, you will be confronted by this message:

Since the Customer ID field is numeric, the LIKE operator does not apply. If this happens during data entry you may want to type the value e.g. into the Last or Corporate Name field or any other field of Text type that is linked to the Names table*, and this is what happens:

Press on the Find nearest button:

* Because no match was found, the Multiple Finds panel displays all records found in the table. The panel always lists the table content in alphabetic order based upon the field that triggered the action, in our example the Last or Corporate Name field. This is not a practical way of handling the problem, if the table content is "massive." A better method is to enter the known name, in whole or in part, to find a match. For example: typing a single D into the Last or Corporate Name field produced this narrowed-down selection:

The Multiple Finds panel is a System feature associated with linked fields and has nothing to do with user-defined Procedures. We have shown these tools in the context of this Tutorial to make you aware of what you might encounter as you carry out your exercises.

 





 

 
Go To

  Tutorial 33 - A Sales Order Report
  Index