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.
I've employed the Scripted Pop-up Menu quite a bit on this entire solution. In fact, on this particular layout you'll see it four times: once here, once there, one here and one down here. And it's a simple little technique that says Go to this field and pop it up. Now the reason I like this technique is because I like to use a drop-down list so I can have the ability to use Type Ahead and besides the fact, any keyboard feature like tabbing to it and things like that, all work with the drop-down list, so a Pop-up Menu just doesn't work as well with the keyboard. But I like some of the aspects of the Pop-up Menu and I don't really like the little drop-down arrow you can put on a drop-down list because then it prevents you from doing this, when you click it allows you to modify and I don't really want to give that option. I want whether you click here or there it allows you to drop down the list. So that's my whole idea and thinking upon using drop-down lists that kind of look like pop-up menus. Plus I like the way the interface all goes together. You see that that's much easier that that's a drop-down list so you can pop that up. I just think it points it out much better. So what we want to do is make it so that all your scripts, all your Pop-up Menus work from one script. Why do we want to do that? Well, let's say you want to add something to all of your script? Well, right now they're just single lines. If we go into Layout Mode you'll see that if we double-click on this it just says Go to Field. And that works fine, but what if you want to add something onto it to all your scripts? You'd have to go and write a script and then write a script for each one and add that same line on there, because what we do is we do want to add something on there. If we go and click like this and then click over here and then click on the button notice it doesn't work. If we click here and then click here again it doesn't work. It's because you're already in the field, that Go to Field doesn't work. So I actually do want to add something onto the beginning of this script. So what we really want to do is think ahead on your solutions and make sure you have them set up right so you can make them as easy as possible to modify in case you need to add something so, in this case, we're going to go kind of wish we'd thought of this before but we didn't, but sometimes you have to learn things the hard way. So we're going to now make this one script that runs all of these, so there are several steps to this process. We'll first go to Manage Scripts, create a New Script and call it Popup and that's going to do something like this. Go to Object. We're going to say Get ScriptParameter, simple as that and then we're also going to include the Commit Record to solve that problem where it wouldn't pop up the menu. That's our whole script. Not very complex. Uncheck that. And now we have to go into Layout Mode and do several things to each one of these objects. First is we have to name each one of these fields, so I'm going to go with a little naming convention, I'm going to call this Menu field in case you want to call it something else, maybe Menu tab control, or Menu this or Menu that. It just helps you have unique names. So we'll put a capital F there and then we'll call this, we'll call it Customer Field and then Category Field, and then last one is the Status Field, just barely peeking out there. And so once we have that then we get to modify the scripts. So we'll start with this one up here. I'm going to say Perform that Script, Popup and then we have to make sure we pass along that script parameter that's the same as the name for that field so we'll call it menu field and put that inside of quotes and that should do it. I'm going to come over to this one, actually do the button here, Perform the Script, Popup and that will be our Customer Field. There we go, click OK. One more to go, or two more to go actually. Kind of wish we'd done this in the first place. It would have made it a lot easier. So we'll come all the way down to the bottom, choose Popup, put in Category Field and then our Status is the last one here so we'll double-click on that, there we go, Popup and Status Field. Now as long as I've typed everything correctly then it should work here, so let's test it out just to make sure. Go into Browse Mode and we'll try popping this one up. Good. That one pops up. That one probably just didn't, delayed for a second there and this one pops up as well and if we have our cursor in there and pop it up because it does that Commit it will still pop it up. So all around this works better, it's more dynamic so we can add things, you know, more efficient so we can add more script steps to it if we want, if we find something else that needed a change about it, maybe it's just for this particular solution. All in all it's just a better way to do things.
| 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 |