Home
Username:
Password:
FileMaker Pro 9: Advanced Tutorials

FileMaker 9 Techniques / Highlight Portal Row




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.


Learn More

Subtitles of the Movie

Highlighting the portal row that you've clicked on is really easy in FileMaker 9 with conditional formatting and a simple Script. In the past you had to use global fields and calculations, and so you cluttered up Define Database, and you also had to deal with the limitations of global fields such as when you save a clone or things like that. But now it's much, much easier. So let's start by creating the Script, and we'll create a new script called Portal Row Highlight. So the first step is going to be set variable. We'll move that in there, and we're gonna set a global variable. The reason for that is that the conditional formatting which is outside the Script has to be able to access the result of this calculation. So we need to make it a global variable. A local one would only be available in the Script. So we'll come in here, and what we want to do is look at Invoices By Customer, that's the portal the relationship is based on, and then we're going to grab our KP Invoices ID. That's because that's the unique identifier for every record we're looking at. And we're going to place that right inside of that global variable. And then what we're also going to do is refresh the window. So we'll move that in and flush the cash joined results, okay? That will make it able to refresh so the conditional formatting can go ahead and look at what the new variable value is and highlight the right row. So we'll close that, save it, click there, close this, and now we can go into Layout Mode. And just realize we're going to be adding it into this portal that's on this tab. Remember we have the hidden Tab Panel here? Well we want to make sure that you add this feature to each one if you want the portal, no matter what you're sorted by, to be able to highlight that record. You won't have to have multiple Scripts, but you will need to have multiple conditional formatting. Everything we do from now on will have to be duplicated across the portal. So what we need to do is we have to have something that highlights, and you could choose the fields if you wanted. But I'm going to go ahead and draw myself a button, have it do nothing, and we're going to make it blend into the background here by making it transparent. There we go, and we'll place that right in there. And just for now we're going to make it visible so we can see it, the outline, and fit it right in there. We're going to make it the entire length of this portal row. Looks pretty good. And now what we can do is come in here and add the conditional formatting. So we'll go into Conditional, and we'll specify our formula to be Not Is Empty, dollar sign dollar sign row, because we need to make sure that if that doesn't have anything in it that it's not gonna highlight all the rows or something like that. And go back to this relationship, Invoices By Customer, check that and say: Does that equals what's in dollar sign dollar sign row? This'll make sure that it highlights whatever row is stored inside of that variable when we run that Script. We're going to want to change the fill color to some really nice light yellow I think. That looks good. And then we're also going to have to this into a button, so we could've done this when we were setting up the button in the first place. But let's perform the Script, come down here to the end, run that one, and now what we're going to do is we're going to make this invisible completely. So we'll come to the pattern and change that, and then we're going to send it to back. And just so I can make sure I get it in the right spot, I'm going to fill it with a red color just for now, send all the way to back, and you can see how it's disappeared. We want to bring it forward a little bit. So we'll bring forward until we can see it, and that's perfect. Now we can make it completely transparent, go into Browse Mode, and let's see how it works. So no matter where I click it should highlight that row, which is great, that's exactly what we want here. Click down here, highlights that row. And so on and so on. So that works great, and because this field's on top of it, you can still get into it. It's on top of that button so you can still get into it and change it. But no matter where else you click, it's going to highlight that row for you.

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