Filemaker Pro Lesson
Data Validation - Specifying Values for Defined Fields
This lesson requires Registrations.fp7.
Filemaker also provides the capability to automatically enter developer-defined values in database fields. Fixed values can be entered using the "Data" option or a range of values can be entered using the Calculated Value option.
1. Using the Registrations.fp7 file, select File -> Define -> Database and the Fields tab. Click on the "Registration Fee" field and click the Options button.
2. Check the "Data" checkbox and insert the value "25" in the text field. Click "OK" and "OK".
3. Choose Records -> New Record. Notice that the value 25 automatically appears in the Registration Fee field.
Some database fields should not be left blank, or should contain information within a specific range. You can set validation options that either remind or require data entry personnel to enter data into a particular field and ensure that the data entered is within valid limits.
4. Select File -> Define -> Database and the Fields tab. Select the "Current Pledges" field and click "Options". Select the Validation tab.
5. Check the "Not Empty" checkbox. Now, check the "Validated By Calculation" checkbox.
6. In the Specify Calculation dialog box double click the "Current Pledges" field in the current file field list, double click the >= symbol in the "Operators" list, then type "50" and click "OK".
7. UNCHECK the "Allow User to Override During Data Entry" checkbox to force the data entry personnel to enter an appropriate value into this field. If you leave that checkbox checked (the default in FMPro 7), the user would see a message reminding them of the field requirements, but they could override those requirements.
8. Check the "Display Custom Message if Validation Fails" checkbox and type "Each person must have at least $50 in pledges before registering." in the message text box. Click "OK" and "OK".
9. Navigate to the second record in the database. Type "10" in the "Current Pledges" field and press "Tab". An alert dialog box appears displaying the message you specified. The "Revert Field" button will return the field to its previous value. The "OK" button will return you to the "Current Pledges" field so that you can enter an appropriate value. Click "OK".
10. Type "160" in the "Current Pledges" field then press TAB. The new value meets the validation requirements.
If you have an RSS feed that
would be of interest
to faculty and students at the College of Education
please contact Mary Harrsch.
Last updated: 05/19/2005