This form accesses and maintains the records in the mag RMSfile. The form layout is identical to that used in the Demonstration Subscription System. The formfile you will be creating will also be given the name mag. To create the form, proceed as follows:
1. From the Toolkit Development Menu, select choice 2 - Data Entry Forms Menu and press RETURN.
2. From the Data Entry Forms Menu, select the choice for creating a new form, D1- Create a Data Entry Form.
A parameter form requests the name of the new formfile and its description. The same form allows entry of text describing the form. The default description is Form created with Toolkit. Enter mag for the form name.
Now, STORE the parameter values.
The system now displays the Form Description screen. Press ADD <F6>.
3. Enter the following information into the fields of the Form Description screen:
Field - Entry - Explanation
Form Name - mag - Arbitrary but memorable name chosen for the form.
Data File - mag - Identifies the RMSfile as mag.
Beginning Form - yes - Indicates that this is the first form of the formfile.
Unique Records - yes - Disallows adding a record with duplicate key field values (magazine codes).
Repeating Form - yes - Instructs the system to clear the fields following certain activities (e.g., DELETE, STORE, etc.) but not to redraw the screen.
Append Form - no - Indicates that this form is not appended to a previous form.
Freeze Form - no - Indicates that the form need not be frozen on the screen when other forms are appended which may cause the form to scroll off the screen.
Additional Form For One Record - no - Indicates that this form is notassociated with a previously displayed form in which other fields which are a part of the current data record were located.
Required Form - no - Indicates that this form is not required.
Next Form Name - mag - Because this formfile has only one form, the name of the next form is the name of the current form.
When these entries have been made correctly, store them by pressing the.STORE key <F5>.
Note that the system will display a blank screen, which we will refer to throughout this chapter as a development screen, after storing the record. This is normal for a new form. Also note that the cursor is located in the upper left-hand corner of the screen.
4. The layout of the mag form is done on this development screen. The actual form creation process allows you to enter text and form fields practically anywhere on the screen. Since this tutorial reproduces the Demonstration Subscription System, the form for entering information into the magazine file should be reproduced exactly as it appears there.
To reproduce the screen, continue with the following directions:
5. With the cursor in the upper left-hand corner, type the form heading:
There is no need to press the STORE key <F5> to store background text entered on the development screen. The system automatically retains any text which is entered.
6. To enter the field which will hold the magazine code:
a. Press RETURN twice to move the cursor down the left margin of the development screen.
b. Type the text, Magazine.
c. Press the Tab key twice to move the cursor to the right.
d. Press the ADD key <F6>.
The Field Description screen is then displayed. Notice that the word ADD appears in the lower left-hand corner of the screen.
e. Enter the following information for the magazine field on the Field Description screen:
Field - Entry - Explanation
Field Name - magazine - The system validates this name in the dictionary of the RMSfile mag. If an invalid field name is entered, the error message Cannot find field in dictionary is displayed.
Field Length - 15 - After the system validates the Field Name, it automatically enters the field length in this field.
Entry Allowed - yes - Indicates field will be used for data entry.
Input Required - yes - Indicates that input in this field is required.
In Data File - yes - Indicates that this field is in the data file.
Invisible - no - Indicates that the field is to be displayed on the screen.
Validation File - No entry required.
Lookup Field - No entry required.
Validation Form - No entry required.
Initial Value - No entry required.
Default Value - No entry required.
Format Pattern - No entry required.
Copy from previous field - No entry required.
f. Press the STORE key <F5>. Note the display of the development screen and the appearance of the reverse video input block associated with the magazine field.
Now create the next form field, title.
7. To create the field magazine title field:
a. Press RETURN twice, type the word Title, and press the Tab key three times in order to space over to where the field should begin.
b. Press the ADD key <F6>. When the Field Description screen is displayed, enter information for the title field.
c. Store the record using the STORE key <F5>.
The development screen is once again redisplayed, with a reverse video block associated with the title field.
8. To create the yearly subscription rate field:
a. Press RETURN twice, then enter the text Yearly Rate.
b. Press the Tab key twice, then press the ADD key <F6>.
c. With the Field Description screen displayed, enter the information for the year_rate field.
d. Store the record by pressing the STORE key <F5>.
9. To create the subscriber count field:
a. Press RETURN three times, then type Subscriber Count and press the Tab key once.
b. Press the ADD key <F6>.
c. Enter the information for the subscribers field in the Field Description screen.
Notice that the Entry Allowed field is set to no, since this is a display-only field; it is not an entry field allowing input from this form to the file. Its value is entered into the file from another source; therefore, the fields contents are merely displayed. Also note that you may override the default value entered in the Field Length field.
d. Store the record using the STORE key <F5>.
The development screen is once again redisplayed.
10. All entries to the formfile mag are now complete. Review the form and, if it does not match the screen as it is reproduced here, reposition the cursor on each incorrect field and correct the information using the UPDATE function. (Note: For more information on making changes, see the section entitled Modifying a Form in this chapter, or use the HELP function, that is, press the GOLD key <F1> followed by the H key. When you are satisfied that all the entries have been made correctly, write the formfile by pressing the EXIT key <F8>. Upon exiting, toolkit displays the message:
Adding logical form file mag to form file database...
Catalog entry for logical form file demo.smj~mag added.
Push RETURN to return to menu...
Once the RETURN key has been pressed, toolkit redisplays the Data Entry Forms Menu.
11. It is time to find out how the formfile works. Test the formfile mag by selecting choice D3 - Test a Data Entry Form and pressing RETURN. Toolkit displays a parameter form requesting the name of the formfile to test.
Type the formfile name, mag, as indicated and press RETURN. The system responds by displaying the data entry form that you just created. The fact that the form appears is enough of a test for now. (Note: For more information on testing a form, see the section in this chapter entitled Testing Forms.) Exit the form by pressing the EXIT key <F8>. The Data Entry Forms Menu will then be redisplayed.