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.
The first step to creating the custom form letter solution is the definition of the fields for the interface. And as you can see in this example file found in the Work Files, we need xname, which is right up here, xfield, xletter, these are for the interface and then we also need the Letter Field, which is for printing. So we're going to create these fields inside of our solution. We'll go to Manage Database and we could put these fields inside of globals. The only problem with that, as we'll find out later, that one or more of the fields are going to be used in special situations such as relationships and they're going to need to be in the Customers Table. So rather than dividing them up and putting some in globals and some in Customers, let's put them all inside the Customers Table. So we'll start with xname. We'll create that as a Text Field, then go to Options and make it a Global Field. We'll do xfield, go into Options, store it as a Global Field and you may not know what these fields do exactly but we'll explain them as we go along. We're just going to create them right now. Then we'll do xletter. We'll create that, go into Options, store it as a Global and then we need our Printing Field, the Letter Field. That'll just be a regular Text Field and if you're viewing in creation order, you'll be able to see all of them right here and easily, you know, look, find them when you want them. Since we're going to use them right now I'm going to leave it in creation order so I can just go to the bottom and find each one of the fields I want. So we'll click OK and the next thing we want to do is find a suitable layout to base this Form Letter Layout on. One that allows us to, you know, modify it easily. So if we take a look at Globals Form, this is pretty good. We're going to duplicate this layout and then we'll go into Manage Layouts, find this Global Forms Copy and edit it and the first thing I like to do is change it to the right table occurrence. That's going to be Customers. We want it to be the same as our Customers Form and Customers List because they're going to be interacting with each other. If they're a different table occurrence in Customers, such as you saw there, Customers Category, anything like that, it'll show the same records but not the same found set. We want to move from Customers right over to our Form Letter and be able to print the same found set of people that merge letter. So we'll change the name, we'll call it Customers and we'll call this Letters. That looks good. Click OK, close that, come in and change this so we don't get confused. We'll call it Form Letters. Select all that text, paste in there. I use the Paste without Style so we get that same gray color back there and that looks pretty good. We may or may not need these buttons back here but we're going to go ahead and get rid of the buttons on them so we'll select all these buttons and the easy way to get rid of the buttons is just to say Ungroup and it says do you want to remove the button definitions when you Ungroup? We'll say OK. Three times and then those are all gone and then we'll just take this word Undefined and copy it and paste it on here. There we go. We don't need a lot of this stuff. We're going to get rid of all this stuff up here and eventually use these fields down here. But before we go on to creating the rest of the interface, what we need to do is put in the Menu Button here so we can get in and out of this layout. So we're going to go back to our Customers Form, we'll come in here and get the pieces that we need, which are these pieces right here, we'll copy that, check out where it is on the layout. See it's at 518 15 and we'll switch over to here, paste it, change it to 518 15. That should be in the exact same spot and now what we want to do is change the script and we'll start actually with the Value List here. Actually I didn't mean to double click there. We, but it does handily bring up the Inspector for us and what we want to do is come in here and edit the menu's pop-up menu. We're going to come in here and put Form Letters and then add another -so it looks nice. Then we'll come into our Scripts and find our Menu Button. We'll open that up, come in here and duplicate something. I like to put in essentially the same order there's on the menu, come in and change this to Form Letters. Now, you could also add Form Letters into the Navigation Menu for the custom menus if you want. It's up to you. I'm not going to do it since we've done it quite a few times but we at least need some method for moving back and forth easily just to test it out. We'll keep this Back Store here. We'll need that and actually, you know what, I think about it, we're actually not going to include this in there so let's take that out. There we go and then we're going to say go to the right layout, which will be this one way down at the end, Customer Letters and there we go. We've got that all completed so we can save that and we can test it out. We'll go into Browse Mode and let's see how this works. We'll say go to Products is good enough, doesn't matter and then come back here and go to Form Letters and see if it gets that for us and we didn't see any, you know, shifting of objects so it looks pretty good. We still have the old global fields on here but we're going to get to that later. The important thing here is to notice that if we have 51 records here in our Customers, right and we omit a record and then switch over to our Customers Form, notice that we have the same found set. I can omit a record here as well and then switch back to our Customers Letters and you notice we have the same found set here so that's important, the interaction I was talking about, why we want to base them on the same table occurrence so we can move back and forth, we can make a found set in our Customers of any criteria we want and then move into our Form Letters and print a form letter to just those people we found.
| Course: | FileMaker Pro 11: Advanced |
| Author: | John Mark Osborne |
| SKU: | 34140 |
| ISBN: | 1-936334-36-4 |
| Release Date: | 2010-07-09 |
| Duration: | 14.5 hrs / 159 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |