Delete Duplicates / Contacts from Invoices pt. 3
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
Now we're ready to take a look at the Master Script that controls everything in this new, more complicated duplicate record checking. It's this button right here, and it produces this message first, this Show Custom Dialog. Let's take a look at that script and it's down here. It's called New Contact From Invoices. So we'll edit that. And we start off with Allow User Abort, then Set Error Capture, then we check to see is there something in the KF Customer ID? So if there is something in it, we do what we did before, which is go to that related record so that we can modify that contact. That means there's somebody on there already, otherwise, this is where the new stuff comes in. We initialize X Name First and X Name Last, and then we show our Custom Dialog, enter the name, First and Last of the contact you wish to add, Okay, and Cancel. And then we have these input fields for first name and last name, which is X Name Last and X Name First. If they chose Okay, Get last message choice equals one, then we create a new window. Call it Customer, and we want to offset that a little bit so they can still see the window behind. So we say: Get Window Top plus 20, so it gets us the current window, because when you create a new window it goes right on top of the other one, so if we say Get the Window Top Location and add 20 it's going to move it 20 pixels down, same with the left. Add 20 to it. So wherever that window is it's going to be offset by 20 down and to the right. And then we go to the Customers Form New layout, that's the one where we entered Elmer Fudd, we enter Find Mode. We transfer what they entered into this custom dialog up here, from that into the regular field so we can search on them. Perform the find, and if we get No Records Found, we automatically create a new record taking the global fields and putting them into, because we're in Browse mode now, putting them into the regular fields. And then we enter that loop-pause thing. Otherwise, if we do find records we go to List View New. So let's take a quick look at that script. It's exactly the same as our List View. It checks the Status Area, but then goes to underscore List 1 to underscore New, or List 2 underscore New. Simply a little vari-, I just duplicated the other List View script and added on underscore New and underscore New here. It's that simple. So we'll come back in here and what we do after we go there is we show this nice little dialog that says: Please select an existing Customer or create a New Customer, and we enter the same loop-pause and loop thing. You remember we have either the button over on the left on each record to select one, or the New Customer Record and it's all those scripts we covered before, all interacting with this one. Remember they all halt it. So, wherever we end up in this, we're either going to end up here, or here, depending on whether we go to the Form View or the List View, they're all going to halt the other scripts that are running, so once we click those other scripts, whether it be, and we'll show these layouts again, whether we're on this layout and we click Continue, or we're on this layout and we click either this button or this button, doesn't matter. They're all going to halt that initial script, so they stop it so it can continue on with another script. So you can have scripts kind of hop over each other, kind of one after another, right in a row, and one can take over and say: You stop running. I'm going to run. And so that's a, a very valid technique and can help you really make a very complex script that might be one script into a very simple script.
Tutorial Information
| Course: | FileMaker Pro 9: Advanced |
| Author: | John Mark Osborne |
| SKU: | 33824 |
| ISBN: | 1-934743-32-1 |
| Release Date: | 2007-11-21 |
| Duration: | 10 hrs / 115 lessons |
| Work Files: |
Yes |
| Captions: | For Online University members only |
| 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 