Save a Found Set / User Interface
Subtitles of the Movie
With our Save and Restore scripts done, where do we put them in the interface? We need somewhere where the user can access them and we could consider the button bar, but there's really no room left here. We could consider the pop-up menu here, but this only works in the invoices to save and restore, so we don't want it available inside of customers, which this will be available at. We could put it under these custom menus, once we set them up, but, you know, really ah, I think the best option is to make a little tiny button here and rather than making one of these long buttons, let's just make an icon, because it's not going to be used that often. And, in fact, what we're going to do is we're going to put a new script on there that says, Do you want to restore or save? And so, we'll make one button branch out to either saving or restoring, so let's go get an icon from the FileMaker reference and if you don't have a FileMaker reference, just go to the working files to the end and you'll see this graphic there and you can grab it. So what we want to do is get into Layout mode here, and then drag this icon right in there. Get rid of that. Move this over just about to where we want it. And then we're going to click right on it, so we can zoom right on that spot. Show us our status area, and we want this graphic to highlight properly, not all over the place, like a square unprofessional highlight, and that will happen because this came from Photoshop rather than FileMaker graphics, so it's real easy to fix. Let's click on here, get ourselves a red fill, and a pen fill of red as well, and then make sure we have 1 point here, and then start by drawing a rectangle to fill up most of the area here. And then we can get our line tool and draw a line here, move it up. Now I don't try to draw really short lines, because it's really hard to do them. I usually do a longer line and then I'll come in to view my object info and change it here. Let's see how that worked out. That made it the right length it looks like. And then we'll duplicate that. Move it on into this spot right here. And you can see that one needs to be a little bit longer, so we'll make that 3 pixels; that looks good. And we'll duplicate that, 1-2-3-4-5, 1-2-3-4-5-6. There we go. Get it right in there, duplicate again, again, keep going down until we have all these covered; there we go. Make this 1, make this 1 also, and I think this will be a 2, and this will also be a 2. It doesn't have to be perfect, just better than a rectangle. In fact that'll be a 3 there, so we'll change that one. And we don't really need to cover this. We could if we wanted to but it's not really that important. We just want to have a decent highlight. So we'll select everything, shift click on the edge here so that the graphics are deselected, make the graphic, or the FileMaker objects transparent, group them, and we don't have the button yet, or the script yet so we can't attach it. So let's just say Format button setup, choose perform script, and leave it unknown for right now. And then we'll go into ScriptMaker and we'll make our new script. This will be Restore or Save. There we go, and we're going to ask, well, obviously should start with Allow User Abort, so we'll start with that. That'll be one of our subscripts. And then we can say, Show custom dialog, Restore or Save, would you like to restore or save a found set? And we'll make this Restore, because I think restoring is going to be more common than saving, but who knows. Cancel. Leave that option in there. And then we'll put in our If statements; If, and then we'll also need an Else-If: Get last message choice equals 1, and then another one here; Get last message choice equals 2; nothing if it equals 3 because that's cancel, and then we need some perform scripts. If it's 2, we'll want to run the save right there, and then we'll duplicate that, and if it's 1 we want to Restore. There we go. Simple as that. Close that. Save it. Uncheck that. Move it up into here. And I think I'll make these indented, just to show that they are subscripts. There we go. Just put three spaces in front of it. And that'll just make it easier to see it. Instead of having to read it you'll realize these are together with this one right here. So let's close that, double-click on this, specify the new script, restore save, and then we'll zoom back down to 100 percent, and we probably should group this together and let's give it a try. Let's go into Browse mode, and let's see how it works. So we get this nice little message. We know that the Save and Restore scripts already work, so no need to test them again, but I'll try the cancel and make sure nothing happens. So, that's great. Now what you want to do offline is take this button and copy it to the two list views that we have. Other than that, that's all we have to do for the Interface.
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 