Tutorial 1 - Building a simple Global Template

Templates are used in a number of functions in STEP FORWARD for database table creation and data input. Our tutorial will take you through some small learning steps that will eventually help you to understand the total picture.


Exercise 1 - 1, The New field and its options
During this exercise you will work with a single field and step through some of the features of the Inspector.



Launch the Global Templates editor.
This will display an empty Open Global Data Template panel.


Click on the New button.

This will display three windows: the Palette, Workspace, and Inspector. The name is UNTITLED. In preparation for working with the Workspace and laying out a neat looking template, let's equip the Workspace with a Grid.



Select Format > Grid > Grid Panel menu item.
This will display the Grid Inspector.

Change Grid spacing X to 6 and Y to 6. Click on the Set button.

Select Turn Grid On (Format > Grid).


Drag a New field from the Palette and drop it into the Workspace.

Because this is the first template for this database, this field will have the title Field1 (the next sequential number based on all fields included in previously saved templates) and be surrounded by eight small squares (Control Points) which indicate that the field is selected; and the Inspector will display the Attributes view.

The title Field1 which appears on top of the field is the User name. You will note in the Inspector that it also appears as the System name. Both of these settings are the defaults and can be changed. The System name is the name used as the database column name for this field when the template is being saved and the database table is created - it is subject to the syntactical restrictions imposed by the database rules, such as not allowing embedded blank space in the name, using only alpha for the first character, etc.; these restrictions do not apply to the User Name (should you desire to space out a multiple word System name, STEP FORWARD will replace your space with an underscore). Other default settings for every New field are: Data type = Text with a Size 40 Max setting; Input action = Suggest; and Mandatory input = NO.



Step through the different Data type options.

As you select them, watch the field, some of the options will change the physical shape of the field. All fields are resizable - according to the Control Points shown (only Image and Note fields can be resized horizontally and vertically; all other fields can be resized horizontally only, since their vertical resizing is an automatic by-product of Font selection). Also note the sub-options applicable to some of the Data types:

Text = specify the Size and make the database field of Fixed length or up to the specified Max.
The default setting is 40 characters Max (maximum). You can specify the number of characters other than 40 and select Fixed or Max. In the case of Fixed, the number of specified characters will be allocated in the database table, whether or not the actual data uses all the space (there are database efficiencies associated with this option; however, the price is wasted storage space); or, in the case of a field defined as Max (varchar) it will accept data to the maximum number of characters specified but allocate storage space only as needed.

Integer = pick Bytes of 1, 2, or 4 according to the Range needed;

Float = adjust the output/display precision by dragging the small triangle in the decimal area;

Money = adjust the output/display precision by dragging the small triangle in the decimal area;

Image = Store contents, as part of the Template specific database table, or Link to file;
When resizing, it is often desirable to retain the aspect ratio of the image. To do so, hold down the Alternate key and drag a corner Control Point of the image field to the desired size

Note = resizable as a fixed length format or variable length scrollable through the Inspector's Style options (scrollable is the default);

Switch = logical data - handles YES (checked) and NO (unchecked);

Subledger No = specify Size and select character (Char) or numerical (Num) format.

Reset the Data type to Text 40 Max.



Select the Style tab of the Inspector.

Click on the various Title options.
Watch the field title Field1 rotate around the field and disappear.

Reposition Title to the top of the field.

Click on the Box border options.
Watch the field change with the different options.

Reselect the left Box border option.

Click on the Field Border options.
Watch the field change with the different options.

Reselect the right Field Border option.

Select the left Field Alignment, if not already set.


Select the Input tab of the Inspector.
The default setting is Accept keyboard input as is.

Double-click into the New Field's (Field1) editable area to see the cursor.

Type any text and use the Shift key at random.

Repeat the process with the various Text input options.

Retain the Capitalize first letter in words option.



You have now gone through most of the options as they relate to a New field. Next you will use Field1 as the first field in your simple template.



Type/change the System name Field1 to City.
This will also change the User name, both in the Inspector as well as the New field title.

Set Input action to Ask.


Click on the Save menu item.
This will display the Save Global Data Template panel.

Type City into the Name field and City, State/Province, Country into the Description field.

Pressing of the Return key will advance the cursor into the next field and, in this case, enable the OK button. However, before completing the Save, review the spelling of both text fields; whatever you have misspelled will remain that way because once saved, they will have to stay this way.


Click on the Test button and type into the City field.

Think of the longest city name, it will take up to the 40 characters specified but the field may not be wide enough to display it all; if it is not, dismiss the Test window and adjust the field width in the template.

Exercise 1 - 2, Adding more New fields
During this exercise, you'll add two more fields to the City template: State/Province and Country as already implied with the Description which you gave the City template on saving it. Based on what you have learned in Exercise 1-1, add two more text type fields to the City template:



Add a field with a System Name of State Province (the blank space between the two words will be automatically filled with an underscore by the system), a User name of St/Pr, and the Data type of Text and Size 10 Max, set Input action to Ask. Set the Inspector's Input style option to Capitalize all letters in string. Position the field to the right of the City field.


Add a field with a System and User name of Country, leave the Data type of Text and its default size, set Input action to Ask. Set the Inspector's Input style option to Accept keyboard input as is. Position the field below the City field.

Exercise 1 - 3, Adding the Change field
The purpose of the Change field:
without the Change field, you can make changes to editable fields by selecting the editable text with the mouse or by back-tabbing (Shift/Tab). When the Change field is introduced into the template Workspace, the titles are preceded by the field's number. During actual data entry, you can navigate to the desired field by entering the field number into the Change field - the specified field will become editable with either the cursor positioned or any existing data selected, ready for editing.

The use (and visual presence in the input window) is controlled through Preferences in the data entry mode. When Preferences are set to not use the Change field, the field numbers are removed from the title area of all editable fields. Therefore, it is recommended that templates be equipped with the Change field by the Configurator and enable the user to make the final choice.



Drag the Change field from Draggable objects in the Palette into the Workspace and position it to the right of the Country field.

Note that the Change image is actually removed from the Draggable objects holding well in the Palette, since this field can only occur once in each template.


Click on the Check syntax button on the top of the window.

The button's image is now changed and you will see the following error message in the Workspace:

the problem is that the fields have to be connected to define the cursor movement. Let's do that next after restoring the Workspace to editable status:


Click on the Edit again button on the top of the window.

Exercise 1 - 4, Establishing the Cursor movement
When a template consists of more than one field, you have to specify the cursor movement during data entry i.e. which is the first field to be entered and what is the progression thereafter. The cursor movement from one editable input field to another is achieved by connecting these fields in sequential order with an arrowed line that exits the originating field at a 90 degree angle:

When the mouse is in area 1 or 3, the connecting line has these shapes (i.e. horizontal from the center of the originating box to the X position of the mouse, then vertical from this point to the mouse):

When the mouse is in area 2 or 4, the connecting line has these shapes (i.e. vertical from the center of the originating box to the Y position of the mouse, then horizontal from this point to the mouse):

Once the mouse emerges from the box around the field, the lines are fixed. To actually carry out the maneuver:



Hold down the Control key and mouse-drag a connecting link from the first field you wish to complete during data entry (e.g. City) to the next keyboard editable field (e.g. St/Pr).

Remember to draw a straight horizontal connection, drag the line vertically (up or down) until it emerges from the black border surrounding the field; then pull left or right and swing to the horizontal axis of the original object as you head for the target. A similar approach applies to drawing a straight vertical connection: start out horizontally.


Drag a Hub icon from Draggable objects in the Palette into the Workspace and position it below and between the City and St/Pr fields.

The Hub object is used as a non-functional connector that allows the connecting lines to be drawn around interfering objects in the template or to not encroach upon other fields (which would make it visually confusing during template construction - these connecting lines are not visible in the Input windows patterned after these templates).



Connect the remaining fields, utilizing the Hub object.
The Change field, if used, is always the last editable field in the chain of connected fields.


Save the template.

Test the template by completing all three fields. Use also the Change field to edit the data fields e.g. first type Chicago, IL, USA then revisit the fields and replace them with Austin, TX.

THINK ABOUT: What happened to the Palette
You have now completed your first template. Look at the Palette, the pop-up list now includes two items: General and City.


The General list is a basic inventory of all database fields that have been created and can be reused in other templates. You will do so in the next exercise.The view area has three columns: Grab, Type (shows the data type of the field e.g. Text, Date, Money), and Name.


Go To


Tutorial 2 - Duplicate Records, to Index or not to Index