If you want to colorize the entire field contents, try
If [ not IsEmpty ( Get ( ActiveFieldName ) ) ]
Set Field [ no target field ; TextColor ( Get ( ActiveFieldContents ) ; RGB ( 220 ; 0 ; 0 ) ) ]
Of course, replace ( 220 ; 0 ; 0 ) with whatever RGB component values result in your desired shade of red.
Why are you wanting to change the text from black to red? Depending on your reasons, there may be a better way. Also, explicitly changing the color of the text can limit your choices elsewhere.
For instance, if you select text and make it red, then elsewhere in your solution, conditional formatting will not "override" the formatting you've applied.
It's a flat database. I'm recording information on association members. If the information in this field has changed dramatically from last year to the current year, I like to flag it so I can go back later to call them and see if the new information is correct. Having it in red allows me to see easily which member to call.
In Table View -> Layout Mode select the field you want to change color.
In Format menu bar select Conditional and then click "Add"
Now depending on your needs you can choose Condition between "Value is" or ""Formula"
For example if you want to change color of the field if not empty choose "Formula is" and digit Self ≠ ""
Check the box "Text Color"
Click the color and choose the one you like.
Here's why I said it might limit your choices elsewhere. If you turn "Name" red by selecting the text, then formatting it as red, then it'll display as red everywhere else, too. If you jump to a layout with form letters, for instance, then Name would display in red (and you probably wouldn't want that).
Go to a List view instead of Table view. Go to Layout. Click on the field in question, go to Format, down to Conditional. You can enter a formula, such as maybe "ABS ( DonationThisYear - DonationLastYear ) > 100" (that's just an example). In that case, any association member who'd given an amount this year that was more than $100 different than the amount given last year, the field would automatically turn red. No need to "un-red" later. You wouldn't have to do anything...FM would make the comparison and act accordingly.
Does that sound at all like what you're after?
Actually, my needs are way less complicated.
I start a new database each year by saving last year's as a copy. I only change the field if the members have changed it on a paper form they send in (very low tech office here). If I see it's gone up or down a lot, I need to call them. Seeing the number in red not only flags it, but it reminds me to call them. So basically, I'm just changing the color for my own info, not for any particular amount or percentage and the old number and new number aren't different fields, it's just me changing the number in the existing field. Hope that made sense.
Also to add, this field isn't used in any other layout.
Open the attached and give it a shot. There are two scripts. One will colorize red, one will colorize black.
Click in a field, and hit command 1 to turn that field red. Command 2 will turn it black.
Each script is only two lines, so you should be able to either import the script or copy and paste the lines into scripts of your own.
ColorizeField.fmp12.zip 65.9 K
I'd like to try that, but I can't copy and paste it and does my Filemaker understand Dutch?
THANK YOU, Dtcgnet!! That works!
And thanks to everyone else for your replies...much appreciated.