Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Change color of few characters in a text field


This topic is 7836 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I use Filemaker in my medical office and would like to make my lab results more readable. It would be great to change the color of all the flags of abnormal labs. If I could change the text style of just the (H) and (L)'s to be in red it would be great. Any suggestions?

Link to comment
Share on other sites

If you're trying to change the color of some of the characters in a text field in one record, you have to do it manually.

If, however, you're trying to "flag" the entire field, create a calc field for each color you want, and set it to equal the contents of the main text field when the proper conditions are met [if(Text = "H", Text, "")]. Then put those calc fields directly in front of the text field, making sure that the fields' backgrounds are transparent. Also, turn off the "allow entry..." in the Field Format.

Link to comment
Share on other sites

There is an example of how to do this by either coloured text and/or coloured background in sample file under the Handy Bits post in the Samples section of this forum. Its on about page 3 by now, and go towards the end to make sure you get the latest version (v4).

What sort of Lab results are you looking at? I did some examples of petrie dish results in filemaker where the user clicked on the relevant grid squares for positive results and they would record results and produce stats for the experiments. Give me an email if you want this example.

Link to comment
Share on other sites

Hello dkemme,

If you're trying to change the color of some of the characters in a text field in one record, you *can* create a script to do it automatically.

The method I'd suggest is based loosely on one which has been around for quite some time, but requires that you set up a script which will parse the text to identify the starting and ending points for each of your desired formatting changes. From your description, however, I should think that this would not be too difficult, and could be done either by hard-coding the parsing calcs into a script, or by providing a global field into which character strings that you wish to see converted to red can be entered.

You'll find a demo which provides an example an the automatic text formatting technique available for free download from the following URL:

http://www.nightwing.com.au/FileMaker/demos/AutoBold.zip

The example script featured in the demo changes all instances of a user-specified character string in a given field to bold (& dark blue) character formatting, but could readily be adapted to apply the red formatting you're looking for.

As you'll see if you pull the demo file apart, the initial set-up is a little exacting, but once the system is set in place, the custom text formatting process will be smooth and automatic.

Link to comment
Share on other sites

This topic is 7836 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.