DYK: What Happens In A Multiple Layer Conditional Formatting?

From Dwayne Wright - www.dwaynewright.com

Did You Know? (a series of quick discussions on things that you might have missed about FileMaker).
------------------------------------------------------------------------------------------------------

DID YOU KNOW?
Conditional Formatting is a new feature added with the introduction of FileMaker 9. It allows you to control how a text string is formatted in browse mode dynamically via a calculation. Before I discuss the main topic of what happens when you have multiple layers of a conditional formatting setup that may conflict, let me put some quick links about the topic in case you want to read up on it.

FAQ: FileMaker 9 Conditional Formatting For Instant Web Publishing
Conditional Text Formatting
FMP9 Conditional Formatting From FileMaker Collective Blog
SNAPSHOT: FMP 9 And Conditional Formatting
Common Uses For Conditional Formatting
EXAMPLE: FileMaker 9 Conditional Formatting

CONFLICTING CONDITIONAL LAYERS
So conditional formatting is done via a calculation. Calculations can have many layers such as when functions are used like If, Case or Choose (to name a few). These “what if” layers allow you to create a lot of flexibility in your calculated result. What if you setup a multiple level calculation and you come across a record that fits more than one layer. The old Saturday Night Live skit about “It is both a floor wax and a dessert topping come to mind.” What does FileMaker do? Does it take the first layer, the last layer, blend the two or do nothing?

Then answer is the condition that comes last will override any previous conditions. This is good to know as you will likely begin to layer your conditionals.

In this example, (an updated version of an earlier example showing off conditional formatting), I show off the last conditional is king behavior of conditional formatting. You can choose what artist you want highlighted. You will see them highlighted in bold red. Then you can choose one of the songs from that list and see it highlighted in bold blue.

Here you can see the second layer that will highlight the selected object in bold blue.

Here you can see the default setting where an artist is selected and the portal records are highlighted in bold red via conditional formatting.

Here you can see a selection in the second global field and it activates the second layer of the conditional formatting and the associated portal row is highlighted in bold blue, overriding the first layer of conditional formatting.

An example file can be downloaded at ...
/blogfiles08/ConditionalFormat1.zip