Any formatting applied at the layout level will be superseded by formatting applied at the data level. If you manually select text during data entry and apply a style, font, or color--just to name 3 possible examples, formatting at the layout level will not supersede these settings.
You can define an auto-enter calculation that uses textFormatRemove to strip away all such formatting during data entry. You can also define a calculation field as TextFormatRemove(data field) and then place it on your layout in place of data field in order for your conditional formatting to work.
thanks Phil, i had a sneaking suspicion it might be *intended* behaviour. Got may way round this particular problem in another manner...
>>Any formatting applied at the layout level will be superseded by formatting applied at the data level.
>>If you manually select text during data entry and apply a style, font, or color--just to name 3 possible
>>examples, formatting at the layout level will not supersede these settings.
I'm attempting to use a Conditional formula in a text block containing a merge field.
My merge field is the number field //n_total_discount//
My layout text block reads "Congratulations, your order qualified for <<n_total_discount>> in total savings"
I have formatted "<<n_total_discount>>" in the layout with a red text color; other text color is black.
My conditional formula states //n_total_discount = 0//
My conditional result is text color is white for the selected text block.
With all text in the block the same color (no emphasis red), the conditional formatting works as expected; when there are no discounts there are no congratulations. But with the desired text color applied in the layout, the conditional behaves oddly, making "in total savings" red and the text to the left the desired white.
Other tests with formatted text colors in text blocks gives different, but still undesired, results.
I don't want to have to start mixing fields and text blocks, when having a single text block with the merge field is so elegant.
Am I doing something wrong?
(this is my first forum post; is it bad etiquette to piggy back my question onto Thomas' ?)
"piggy backing" like this is a judgment call. It's not as big a deal if this were a post in The FM PRO section as that is a general discussion forum for learning how to better use FileMaker. This section, report an issue, is intended for posting possible bug reports in order to notify Filemaker Inc. so that they can add them to their database of bugs if someone else has not previously reported the issue.
In either case, it can sometimes make it easier to describe your issue as you don't have to start from scratch, but it can also "side track" a discussion in a completely new direction. Be aware, also, that older posts like this don't automatically pop up in the Recent list when a new response is added so they are more likely to be missed by other posters. If it's more than 2 months old, you may want to start a new thread, you can always paste a link to an older thread if you think it's applicable to your question.
Now for your question. I think you've encountered a limitation of how conditional formatting works. My tests replicate your results. If I make a portion of the text block a different color, that color supersedes the conditional formatting.
There is a work around that is hinted at already in this thread. You can apply the color directly to the data rather than the merge text. You might, for example, format a calculation field with this expression: TextColor ( YourFieldHere ; RGB ( 255 ; 0 ; 0 ) ) to turn the data in the field red, then refer to it in your merge text instead of the original field.