The Support Group Blog

Highlight the Active Field with Conditional Formatting

This is one of my favorite tips, which we first published in August 2007 when conditional formatting was introduced in FileMaker Pro 9.  A not-uncommon request we’ve received over the years is to highlight the current field with something more than slightly darker field borders.  Conditional formatting seems the perfect answer: there must be a way to change a field’s background fill from its default to another color on entering the field, right? Turns out… no.  You cannot use conditional formatting to change a field’s fill color on entering it.  It’s just not possible.  Never.  Conditional formatting does not work in any way whatsoever while focus is in the field in question. 

And that’s when the epiphany struck. Instead of trying to change a field’s fill from the default to another color on gaining focus, make the default color of every field the color it should have on entry.  Yes, that’s right, if you want fields to turn yellow when a user tabs to the field, make them ALL yellow in Layout mode.  Now, use conditional formatting to change their color when they do not have focus.  Select all your fields, and apply the following conditional formatting rule: set the fill color to white under the condition “Formula is…" True. That’s it (and how’s that for a complicated calculation formula?).  Now, whenever the field does not have focus, the conditional formatting is tested, the formula will evaluate as true (of course), and the unfocused field will have its “default” white fill.  On entering the field, the conditional formatting disappears and the field turns yellow.

Download Sample File
Share this entry
0 replies
BrowseMode

Sign up to receive news and information about the FileMaker platform and other custom app development tools.

Keep me posted

Most Popular

Developer Resources

News, Tips & Tricks and Demos