Ultimate Find / Continue & Cancel pt. 1
Subtitles of the Movie
I always create solutions that are keyboard and mouse friendly, and here's what I mean. When we click on the magnifying glass to go to Find mode, you can see that the keyboard people are fine. When they enter their Find criteria, such as John, all they have to do is hit the Enter key and they like that because keyboard people don't want to touch the mouse. But then you have your mouse people. What do they click here? We're telling you that we're going to have a Continue button, but we need to add it because we're not going to have this status toolbar showing so that this Continue is here. This is going to be hidden. We already added that to our Open Script, so what we need to make is this very comfortable to your mouse people. They're very distinct groups. Some people want to do everything with the mouse. Some people want to do everything with the keyboard. There are some hybrids, but you want to give the ability to do just about anything you can with the keyboard or the mouse. So we're going to cancel this script and we're going to go into Layout Mode. Let's go ahead and borrow our buttons from somewhere. We'll just grab, let's say, this one right here. I'll copy that, switch back to our Find layout, and then we'll paste right in there, just about there. Try to line it up nicely. I like to draw these lines to see if I can line things up. Maybe one pixel down looks pretty good. We'll make this our Continue button and then we'll double click on this and you simply need to Resume Script. That will click the Continue button for you, whether it's hidden by the Status toolbar or available in the Status toolbar because it's showing. No matter where that Continue button is, if a script is paused, this will click it, simple as that. Then what we want is a Cancel button also, so we're going to select this, hold down the Option on Mac or Control on Windows, start dragging down, and then hold the Shift key down so it's nice and even. See how easy that is? If you learn all these techniques for rapid development, it'll make your development much faster. So we'll change this to the word Cancel and then we have to decide what are we going to do? Well, we have to do more than one thing when we cancel because we need to go back into Browse Mode and we need to go back to the original layout, those two things, so we actually need a script here. So we'll call this Cancel Find. There we go. Then we'll say Go To Layout, Original Layout, and Enter Browse Mode. It doesn't really matter what order these are in because it'll still work, but I like to have Enter Browse Mode first. It's just up to you. So we'll save that, uncheck it here, close, double click on that button, change it to Perform Script, and then scroll down here and add that to it. So let's see how this all works. We're going to switch back over to Customers Form, go back into Browse Mode. There we go. Let's hit our button and let's try out the Continue button first. We'll type in John, hit Continue, and it works great. You can see we found all the customers who have the name John. Now let's try out the Cancel. We hit that. We decided we don't want to be here, but we don't want to have to perform a Find to get out of here, so we're going to click Cancel. Now, a few things worked. Some things didn't. The first thing that didn't work was we didn't go back to the original layout. The other thing is that our script is paused still. That's not a good thing. The one thing that did work was we went back to Browse Mode. So let's figure this out. Let's start with why didn't it go back to the original layout? So let's cancel this, go into Layout Mode, and when you clicked this Cancel button, it went back to the layout where you initiated the script. Well, that happens to be this layout. That's where we initiated the cancel script, so it knows that this is the current layout or the layout where you originally initiated the script. It's different with the Find. When you click that magnifying glass, it knows where it started from and it knows where to go back. Not in this case. It's the same layout. So, we need to modify this, so we're going to go into, first into our Ultimate Find script and what we need to do is record, somehow, what that layout we started out on is because Go To Original Layout just won't work here. It'll work in this situation, but not in our Cancel. So we're going to use Set Variable, move it up there to the top, before we change layouts, and we're going to put in double dollar sign, Last Layout. Now, we're using a global variable here because we need to declare the value here, inside Ultimate Find, and then call on it when we're in our Cancel script, so a local variable won't do it for us here. So we have a couple of choices here of what to record and we'll come down here. We have Get Layout Name or Get Layout Number. I'm going to use Get Layout Number here. There's no reason. They really work the same in this situation, but we're going to cover Get Layout Name later, so I want to choose Layout Number here. So we'll click OK, click OK. Now we're recording that value before we switch layouts. Now we can save this, come over to Cancel Find, and instead of going to original layout, we're going to say Go To Layout Number not Name. We could have used Name, but we used Get Layout Number in the previous script, so we'll come over here and say dollar sign, dollar sign, Last Layout. Let's try that out and see what happens. We'll save that, close that, go back into Browse Mode. Actually, we'll switch over here to our Customers Form and then go to Browse Mode, and we'll click on that button and this time we're going to Cancel and see what happens. So that works great. It's back into Browse Mode and it's back to the original layout.
Tutorial Information
| Course: | FileMaker Pro 10: Advanced |
| Author: | John Mark Osborne |
| SKU: | 33927 |
| ISBN: | 1-935320-20-3 |
| Release Date: | 2009-01-05 |
| Duration: | 12 hrs / 150 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 