Getting a FileMaker label’s text in a conditional formula

I wanted to do some conditional formatting, such that when a global field had a certain value the label would change its appearance. For example, if my sort column was “address”, then I wanted the column header containing the text “Address” to highlight.

I had a hunch that the Self function could help. I tested this by attaching a conditional formula to a label:

Using the Data Viewer in FileMaker Advanced I could see that the label’s name was then getting “leaked out” to the global variable $$n in the conditional statement. So, for my use case above, I could simply write the following:

Leave a Reply