We will be undergoing scheduled maintenance on May 20th, 2013 at 02:00 GMT.
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.
Now that we've written a script that stores the visited layouts, we need to create the interface to access that layout history so somebody can actually click on the Back Button. We're storing it but we don't have an interface to access it so we're going to create a script. It's going to be called Back Navigate. We'll start off with Perform Script Allow User Abort and then Set Error Capture and then we'll do our Go to Layout. We're going to Go to Layout Number by Calculation, not Name and we're going to say simply Get Value. Remember, this gets a value from a return-separated list. We have to specify which one. We specify dollar sign dollar sign Back is what we want to look at and then simply one. It grabs the first one at the top of the list. It's that simple. There's nothing else to do. But once we grab it and go to that layout, we also need to remove the value from dollar sign dollar sign Back so we need to do Set Variable. Specify dollar sign dollar sign back and then in our formula we need to come in here and remove everything but, or actually remove the first one which is what we're going to do is we're going to grab everything but the first one so we can do that with right values. We'll put in dollar sign dollar sign Back and if you haven't worked with right values yet, it's just like middle words or right words or left words except that the right values and middle values and left values work with return-separated lists, grabbing a value. It's kind of like Get Value but you can actually grab multiple values like you can with words, functions. So they're very similar in that way. So what we're going to do is we're going to say Value Count. That's going to give us a count of all the values inside dollar sign dollar sign Back. Then we're going to subtract one and then close that off. So we're going to say grab everything from the right but the first one. That's what the subtraction of one is for. Very simple to do. Not a very complex script to write at all. What I'd also like to do is put in an if statement in here that says what happens if they click the button and there's no values in the dollar sign dollar sign Back, meaning there's no history to go through. I'd like to give them a little message so they know what's going on. So we'll come in here, put an if statement in, put in an else also. We're going to say if is empty dollar sign dollar sign Back, simple as that. If that's true, they're going to show a custom dialog. It's going to be something like this: No History. It all depends on what you want to put in here. I'm just think that works out fine for me but I'm not going to spend a lot of time on these dialogs because that's really your job. There is no history to navigate. And then we'll take the Cancel Button out and we're done. That's the whole script. So we'll save that, uncheck it show it doesn't show under the Scripts Menu, move it up here into the Navigation Area right next to Batch Store and we're ready to go. Now we just need to have a little interface here so we're going to go into the FileMaker Reference and don't worry if you don't have the FileMaker Reference because all the stuff that I'm creating inside this solution is available in the Work Files in the End File for this chapter. So just go to that End Folder and you'll see it right there. So we're going to go in here and get into Layout Mode. We'll grab this button and drag it in there and then we'll drag something to put on top of it and looks like this is good. It's different than what we're using for our, you know, these triangles here so I think that make it, you know, because it's kind of the same thing. You're going through layouts but I don't know. This just seems to work for me so you can make the interface however you want though. We'll put it right about there. Actually, I'm going to line it up with this first of all and then zoom in and let's make sure these are lined up. They look like they have to go, well, this has to go up a little bit to make it in there. Then this stuff, we'll group that together and move it down one. I think one pixel's going to do it. Yup, that's it and then we can move it over here away from that. We don't want it too close to it. It'll be kind of lined up with this and then we want to make sure that it, in position-wise, it goes in the same direction as the other objects so we'll have it go over to this side. So that looks pretty good.
| 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 |