4.4 DATA ENTRY WORKSHEET
You will enter data into the database using a worksheet, rather like an input form. Whereas in the DOS version of CDS/ISIS you had to specify a lot about the layout of the form, in the Windows version you need to do very little. The main choice is which fields you want to be on the worksheet. If you only have one worksheet then normally you will want them all, and you need only to click the button with the double arrow to effect this. If you want to be more choosy, or to change the order of fields on the worksheet, you can select fields one at a time and either double- click the field or click the button with
the single arrow. The order does not have to be by ascending tag number.
You can make the worksheet do more by highlighting one of the Data Entry Fields (when you have moved some onto the worksheet) and clicking the button showing a pencil and paper. This brings up a dialog box with some further options:
Description. This allows you to use a different name on the worksheet from the name you have used in the
FDT.
In an integrated database of books and research projects you might have a field for corporate name, used for the corporate author of a book or the host institution of a project. You could have two worksheets, one describing the field as “Corporate author” and the other describing it as “Host institution”.
Default value. If the field will nearly always contain the same value, e.g. ‟eng‟ for language
‟English‟, you can put this in as a default value. It will then already be filled when you use the
worksheet, but you can alter the value when it does not apply.
Help. You may enter a ‟Help‟ message for this field that will be displayed at the bottom of the data entry window when the user is entering data in that field. It is often useful to give an example, e.g.
Enter surname, comma, initials, e.g. Walton, C.J.
Validation format. You can put in a rule to check the format of the data entered, e.g. the length must be a certain number of characters, or the field may only be present if another field is absent. The rule is written using the formatting language described in Chapter 5 and an example that might be used in the specification for field 110 is shown below:
if p(v100) and p(v110) then ’You cannot have two main entries’ fi
The if expression p(v100) tests for field 100 being present and field 110 being present. It will cause a message box to appear after the user tries to enter data in field 110 if there is already a field 100 present. Data entry cannot proceed until the data are removed from field 110.
Another easy kind of validation is to test that the contents of a field are the right length, e.g.
if size(v8) > 40 then ’Field 8 is too long’ fi
However, if you make a mistake in writing a validation rule it may be impossible ever to satisfy it and you will never be able to get beyond this field in data entry. It is therefore not recommended for beginners.
Pick-list definition. A pick-list enables the user to display a list giving a choice of values for a particular field during data entry. In the pick-list definition box you enter choice followed by two colons and a format that will produce the list. The first line produced by the format will appear as the title of the listbox during data entry. For example:
choice::’Languages’/’English’/’French’/’German’/’Spanish’
The values here are all unconditional literals. „Languages‟ will be taken as the title and „English‟,
„French‟, „German‟, and „Spanish‟ will be the choices displayed as shown in Figure 4.2.
Figure 4.2 Example of a pick-list
The first box below the title is to allow the person doing data entry to search for a desired value: he/she can enter the term or the beginning of the term and click the button with the magnifying glass.
You can allow the user to select more than one item from the list by using the
multi keyword and repeat puts each value into a separate occurrence of the field:
choice:multi:repeat::’Languages’/’English’/’French’/ ’German’/’Spanish’
Unfortunately at the time of writing there is a small bug in this part of the program and you may have to enter the data twice during data entry to get the desired result. An alternative is to specify that each value is enclosed in angle brackets:
choice:multi:<>::’Languages’/’English’/’French’/’German’/ ’Spanish’
You will then need to index the field with Indexing Technique 2.
If you follow a standard format for bibliographic records, you may wish to hold the language as a code but display the full name in the pick-list. This can be done using the firstdescribe keyword: each entry consists of its name followed by its code:
choice:firstdescribe::’Languages’/’French’/’fre’/
’Portuguese’/’por’/’Spanish’/’spa’
There are other more sophisticated possibilities in creating pick-lists, thanks to the list being generated by the CDS/ISIS formatting language. However, we will mention one final one: you can keep the list in a separate text file and give the file name here. Each line in the text file is treated as an entry in the list.
choice:files::’Languages’/’langs.txt’
The possibilities described here can be combined, i.e. you can use several keywords separated by colons and the order does not matter, but remember to put two colons before the list values or file name.
Pick-lists are not recommended for long lists (hundreds or thousands of terms) because of the processing time and memory limitations: a better solution is to develop a plug-in application using ISIS_DLL.
OK. Click the OK button to go back to the Worksheet definition screen.
If you have entered any Data Entry Fields by mistake, you can remove them using the button with the left-pointing arrow. You can alter the order of fields on the worksheet by selecting the field to be moved and clicking the (or
( button. A validation rule applying to the record, rather than an individual field, can be entered by
clicking the Record Validation button. For example in Format you could have:
if a(v200) then ’Record must contain a title.’ fi
This will generate an error message if the user has entered a record without any data in field 200 and then tries to save it. Again caution is advised: a badly written rule may mean that you can never save the record. The use of Begin code and End code allows editing to be done automatically on the record when it is opened or closed in the worksheet, e.g. today‟s date could be entered in one of the fields, but it is beyond the scope of this Handbook.
When you have set up the worksheet, click the button with the green arrow pointing right.
No comments:
Post a Comment