Validation / Always vs. Data Entry
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
The last validation we're going to cover is to Validate Always versus just during Data Entry. What we've been doing so far is during data entry. In other words, you click into afield, you type some text and either you tab or commit the record and then it validates. That's during data entry. Very simple, very easy to understand. Let's go into Manage Database and we're going to do something with our State Field so we'll go to it, go into Options and this is the Always Option and this says not only during data entry do I want you to validate, but also during import. We're not going to try that right now because we're going to first see what happens when we import only during data entry to see what the validation does. What we will have to do though is go to auto enter and uncheck this option. Remember this option where it looked up to our Zip Table and brought in the State and the City? Well, if we leave this on, what's going to happen is it's going to go ahead and import and not cause the error to occur. In previous versions of FileMaker, well, this wouldn't happen. The order of precedence has been changed so we need to watch out for that and it may not be true on yours but regardless of what version you're using; 9, 10 or 11, let's go ahead and uncheck this to make sure we don't have any problems because you want to see this validation issue. So we'll click OK, click OK, go to the File Menu and choose Import Records and you're going to find in your Work Files, if you want to follow along with it, a file called Valid.tab. I highly recommend following along because it will help with the retention, even if you think this is easy to remember. Just doing it will help you remember. So if it's dimmed out, make sure you have Tab-Separated Text chosen and we can click Open. I have all mine lined up already. You may have to rearrange some of your fields and you have to do that by Data because this is a text file and it doesn't have any field names and if it helps, you can walk through the data like this to see what data is there but this is pretty simple. You can tell what the states and the cities and all that. Just line it up and make sure there's arrow between everything and we can also go to the second record and see that there's where the error is. There is a state with three values there. OK? That's not going to be valid as far as our validation. We're going to make sure we're doing Add New Records and then Import. Don't worry about this Perform Auto Enter because we're going to delete this data later. You can see that we get two records added, no records are skipped and no fields were skipped and you can see that we have WV and WVA. You can see that the validation did not work because we didn't say Always. So we'll go ahead and delete these. Notice that we're deleting found records. It's only getting the two we just imported. When you import you get a found set so it makes it easy to get rid of it real quick. So Delete All and we're going to go into Manage Database, go to our State Field, go to Options and switch it on the validation to Always. We're going to do exactly the same import. We'll come in here and choose Valid.tab, exactly the same thing, all the stuff is the same, all this is the same. It doesn't matter whether we're doing this or not. And you can see now we get Total Records Skipped: 1. It skipped an entire record. See, we only imported one because there was that error. That's interesting. Well, let's try something different. Let's delete all these records, go to Manage Database, find our State Field again, go into Options and this time we're going to uncheck your Validation by Calculation and go back to the Maximum Number of Characters. Let's click OK, click OK again and we'll try that import one more time. Go to Valid.tab. There we go. Do the import and this time it says total fields were skipped. Very interesting; we got the two records you can see up here but it skipped the actual contents of this field and that has to do with the record reverted versus field reverted. Remember when we went ahead and had that option come up? If we go ahead and type in something like that, we get Revert Field, right? If we go into Manage Database, turn back on our option here, go down to State here and we go ahead and turn on Validation by Calculation, notice that the formula's still there. It keeps it. Turn this one off and now we go ahead and try to type in something we shouldn't have in there. It's going to say do you want to revert the record? There's a difference. The import and the validation during data entry have similar ways that they perform so make sure that you understand all these subtle details about how things work because they can really make your experience with FileMaker better and allow you to make a better solution. So I'm going to go back into Manage Database real quickly and set my State Field back to the way it was. So we're going to go into Options, Validate by Calculation was what I want. You don't have to have that. I also want to go ahead and do the auto enter and have this option on there. There we go. So I like that much better. We'll stick with that and as soon as, again, hopefully when I enter it, actually we're going to get rid of these records so I won't even have to worry about getting the State filled in. So we'll delete found records so we're back to what we were in the beginning of 45 records. In fact, you really don't even need this record. It's got really just partial data on it so I'll delete it also. Now we're back to 44 records which actually have data on them.
Tutorial Information
| Course: | FileMaker Pro 11: Beginner |
| Author: | John Mark Osborne |
| SKU: | 34100 |
| ISBN: | 1-936334-10-0 |
| Release Date: | 2010-03-12 |
| Duration: | 14.5 hrs / 164 lessons |
| Work Files: |
Yes |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 