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.
Conditional formatting was added in FileMaker 9 and it's one of my favorite features. It can be implemented in a wide variety of scenarios but let's start with the basics. So what is conditional formatting? It basically allows you to apply a calculation to an object. That object can be a field, a text block, a button or a web viewer. When the formula that's attached to that object is true, it applies the formatting which is mostly text formatting but you can also do fills and things like that. What it does is it reduces the need for field layering. That's mostly what it does. You know, a lot of techniques take two fields or three fields or four fields on top of each other to change the colors and text depending on which situation you're under. This can reduce that. It also takes the need for those fields out of Manage Database so you don't have a bunch of clutter on your layout with the field layering and you don't have a bunch of clutter inside of Manage Database. So we have a few example here, as you'll see. First is the most basic one, is you can see the Status Field. When it says Billed, it turns red. If it's paid, it's black or if it's canceled, it's black. Simple little formula. We'll go into Layout Mode, click on that field and go to Conditional and you'll see that we have Value is Billed. Value is equal to Billed and when that's true, we set the text color to red. Or we could underline it or bold it or italicize it or whatever. You can even change the fill color if we want and there's additional formatting. You can change the font and all kinds of things. Mostly text stuff but you do have the fill color as well. So it's very simple, very basic. You can also do a formula but the easiest way to do it is with a value. Now, if we take a look in Browse Mode at our field down here, our Shipping Field, we see it's blue. If we go into a different range, it turns green and into a different range, it turns red. So let's see how this works. It's essentially the same idea but it's a little more complicated. So if we go to Conditional, we can take a look at that field and say is it between 0 and 24? Do blue. If it's between 25 and 50, do green. And if it's greater than 50, do red. Now, the great thing about this technique is if any of these ranges overlapped, in other words let's say this was true and this was true? It would first apply the blue, wouldn't apply the green and would then apply the red which would override the blue. So it's always the last condition in this order that takes precedence if they overlap in some degree. So that's important to know about how this works. And then we also have our Overdue calculation. Remember what we did? We went into Manage Database and we made an Overdue formula. Remember we made it unstored and we had this formula if you add 30 days to the date posted, if it's still less than the current date, then and the status is also Billed, put the word Overdue, otherwise put nothing there. So we don't need this anymore. This clutters up Manage Database because what we've done is we've added in some conditional formatting. So if we click on this, you'll see that we actually have text here and it's red text so it's normally red but we change it to gray in some certain situations. So there's actually two scenarios here and you're actually going to see that we're using a formula here rather than a value and you can see that because it's a text block that we can't do a value. You can only do a value is on a field. You can't do it on a text block or a button or a web viewer because it doesn't know what itself is. And if it doesn't equal Billed, in other words it's Paid or Canceled, change the text color to gray. But you have to test separately for the age of the invoice. If the date posted is greater than the current date minus 30, then also turn it gray. So these can actually be true, this could actually keep it the same color red and actually probably turn it gray in different situations. But this is really the only way to accomplish this task here is to separate them. I've tried to put them into one formula. You really can't do it because the reason is because of what I'm trying to do here is I want to be able to see this in Layout Mode. If I just made the text gray and turned it red, I could have used the same formula we had in Manage Database. But because I want it to be red so I can actually see it in Layout Mode, because if I turn it gray it'll look like it's not there and turn it red only in, I wanted to do the opposite of that. Turn it gray when it didn't need to be Overdue and so that took a little more complex formula. So there's some simple examples of how you can use conditional formatting to do things without cluttering up manage database, without layering fields over each other. In the upcoming exercises we'll go over more complex implementations.
| 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 |