Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Change color of few characters in a text field

Featured Replies

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?

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.

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.

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.

  • Author

Your AutoBold is just what I needed, I did not realize that the formatting is retained when pasting in and out of another field, what a great solution. THANKS DJK

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.