In Chapter 4, you learned how to apply fonts, text styles, colors, and so on to many of FileMaker’s layout objects. You can make fields, text objects, and shapes look almost any way you want with a little mouse gymnastics, but you’re limited to just one look for any particular object. Particularly with fields and their labels, though, you may want to make the look change depending on exactly what is going on in the database. Suppose some of the people in your database have a very low Goodness Rating (less than three, say). It would be fantastic if this fact could be reflected by a more eye-catching visual clue than just a below-average single-digit number. What if the whole Goodness Rating field and its label turned red when the rating was below a certain threshold? Then the low rating would stand out immediately as you flip through records. You can apply just this sort of automatic reformatting in FileMaker Pro 9, using a new feature called conditional formatting.
Conditional formatting works by letting you specify a series of conditions and the specific formatting changes that go along with them. FileMaker means condition in the “I’ll give you a hand on one condition…” sense. As long as certain restrictions are met, the formatting applies.
You can apply conditional formatting to any text object, button, field control, or web viewer. Follow these steps to make your database really announce a low Goodness Rating:
Open the People ...