One of the common complaints our customers have is that they can’t tell which field they are in when using FileMaker. Before FileMaker 9, there was no way to fix this for them. With the addition of conditional formatting, not only can you highlight the active field but you can make it bold, a different color or perhaps even enlarge the font.
##Highlighting the Field
I’m going to explain how to do it and then explain why it works. Let’s say you have a field on your layout that you want to turn yellow whenever it’s active (ie, you click in it, tab to it or have some script that selects it, etc.). The first thing you do is select the field and set the Fill Color to yellow. I know, I know, this really doesn’t make much sense because you only want the field to appear yellow when it’s *active*. Well, just bear with me and I will explain latter.
> Credit where credits due: I first saw this technique at DevCon 2007 demoed by Andy LeCates. He of course is a genius but couldn’t take credit for this one. Apparently it was Chad Novotny who actually came up with this one. Thanks for the good work Chad.
Next thing we’re going to do is to set the conditional formatting on the object. Select the object and either right click and go to `Conditional Formatting` or go to the Menu `Format >> Conditional`.
Once you see the above window, click the add button to add a condition. Now click on the Pop-Up under conditional and select `Formula is` and then type true in the calculation box like so:
This condition tells FileMaker that *when* Conditional Formatting rules apply *always* apply this formatting (Note the when this is the essence of the technique). Now we just need to pick what we want to conditional formatting to do, so let’s keep it simple and change the Fill Color to white. Your final conditional formatting dialog should look exactly like this:
Believe it or not you are finished.
##What’s going on here?
The reason why this highlighting trick works is that the Conditional Formatting does *not* apply to the active field. This means that during normal browsing the user will see the formats that are specified in our conditional formatting rule. But if they were to click in the field, those conditional formatting rules apply.
What we did was override the formatting of our yellow field with white and then the field becomes active conditional formatting stops and the yellow shows through. Using this idea you can override any style that conditional formatting allows.
A good general rule is to format the object on the layout how you would like it appear when the field is selected. Then override any of the formats of that field, using the same condition described above, so it that appears the way you prefer in browse mode. Play around with it… I’m sure you will find that you can do some interesting things with this feature.