• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 887
  • Last Modified:

Change text color FileMaker Pro 8.5


  I am trying to accomplish a very simple task that FMPro is making much too complex.

  I want to compare two fields (as I already do with an If statement) and when one is <= the other I want to change one of the fields' text color to red.  

  I have the comparison in an If statement already, and I understand that I need to use the TextColor function.  As I cannot type this function in nor put it under the if statement as a result of the comparison, I am unsure of where to go from here.  

  Any help is GREATLY appreciated.
1 Solution
Will LovingPresidentCommented:
You'll need to create a third field (I'll call it Field1_Display) as a calculation and put it in place of the field whose text you want to have change color, or if you need the user to be able to edit the original field, layer it on top of the editable field.

If Field1 is the field you want to have change color, the calculation will be:

Field1_Display =

   Field1 <= Field2 ;
   TextColor( Field1 ; RGB( 255; 0; 0 ) ; Field1

If you choose to layer the calc field on top of the actual field, just make sure to uncheck "Browse" access in the Field Entry options.

In FileMaker Pro 10 and later you can avoid creating an additional field by using "Conditional Formatting". This allows you to change the appear of a single field based on whatever calculation you wish. Just select the field, choose "Conditional Formatting" from the Format menu or by right-clicking (Control-click on a Mac) and then enter just the comparison part of the above calculation and set the color to Red in the Conditional Formatting dialog. The text will change color if the conditions are met and you can add other changes like Bold as well.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now