Jump 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.

Display partial data in different color

Featured Replies

Hi All,

I want to display a specific word in a field in a different color. Can it be done? What is the way for it? I request to help me with this.

Thanks.

Yogesh Agte

AFAIK, not in 6, only in 7.

Dang I noly got 5 hehehe. Okay.

Hi, Yogseh. This can, actually, be done in version 5, though it's a bit more difficult to implement.

You will need one new calc field for each color you want to display. Let's say you have two fields: Name and Color. You want to display the name in either red, green, or (default) black. Put the name field on your layout, and make the text black. That much is obvious.

Now create two new calc fields: RedName and GreenName. (Make sure both are unstored.) The calc for RedName is:

Case ( Color = "Red" , Name )

and for GreenName:

Case ( Color = "Green" , Name )

Now add these fields also to your layout, make them transparent, and set the text color to the appropriate choice. Lay them over top of the Name field, so that they are perfectly aligned. This will simulate changing the color of your text.

The only drawback to this idea is that it can make data entry kind of a pain; i recommend just making RedName and GreenName non-enterable and taking them out of the tab order.

HTH,

Jerry

  • Author

Hi All,

Thanks a lot Jerry for you guidance. I was wondering if that could be done in FileMaker Pro 4.1 as well. Would this solution just change the color of a specific word in a field or the whole data in that field?

Please help.

Thanks.

Yogesh.

I believe this can be done in version 4, but it's been a long time since i used it. Any version that supports multiple colors for text and the If statement can implement this.

The solution i gave would change the color of the entire text field. If you want to change the color of just one word, you will have to modify the original idea so that there is a calc field that consists of only that word. You can then use the overlays i suggested on only that word.

This gets a bit more complicated, though. You will actually need 3 calcs: (1) The entire sentence up to the colored word; (2) the colored word; (3) the entire sentence after the colored word. You could then use three merge fields to concatenate these on the display, being sure to make the calculated (colored) field a merge field as well and laying it exactly over top of the original merge field.

HTH,

J

Create an account or sign in to comment

Important Information

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

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.