At the main menu, select 4 - Define Edits.
Choose the file "vidcust".
Answer Y to the prompt "Is this a new edit dictionary?" It is new, because we haven't designed any user edits for the file "vidcust" yet.
The following screen appears:
We are going to design a special edit or "filter" for data entry. Any field that uses this edit type will only allow the operator to enter an "R", "S" or "F" in the field. These are abbreviations for "Regular", "Senior Citizen" and "Family". We can keep control over the types of accounts we have in the video store using this edit to make sure we have no Z or Q accounts, or anything other than R, S or F accounts.
Edits work by following a series of rules. The rules we need for our customer type edit are simple. We only want to allow R, S or F in the field. While we are at it, the edit builder allows us to specify a "prompt" that will come up on the bottom of the screen each time the user's cursor goes into the customer account type field. This is also shown above. Prompts are put in apostrophes before the edit rules.
To see the rules for designing edits press the HELP key F10 while entering this data.
You will see in the help screen that the "~" tilde causes the edit to make all entries UPPER CASE, and the pipe "|" character separates "allowable" entries. Users can only enter the three designated characters e.g. "R", "S", "F" or leave the field blank.
Note: A BLANK is always acceptable in any edit as a default. If you do not want to allow a blank, you must program this in a processing table.
Once you are done entering the edit name and its rules, press ESC to save your work.
You can test the "custype" edit by pressing T at the edit design screen. This will popup the following screen.
You must enter the name of the edit to test and the length for which you will be testing. Once this is done, you will enter sample answers that a user might enter in the field. The edit checker will tell you which entries are valid and which entries will fail the edit. Experiment with some different letters and numbers to see how this works.
Finally, type "S" for "Senior Citizen" to see that it passes the edit test.
When you are done experimenting, press Ctrl & C then press X to return to the main menu.
Again, we could immediately go and enter data into this file, but let's not. Instead, let's look at the default screen that filePro built for us.