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.

Can I change color of text in a field..

Featured Replies

Hi All.

First of all I want to say thanks for the help I have recived from this site...

Next I have yet another problem ;o)

I want to make the color of the text in a field depend on the content of the field.

Something like this:

if xx=0 set color to red else set color to black

Looked at the different script functions but have not found any that I think/know could do the job....

Any help would be great

Best regards

The Dog

You can create your field to be an auto-calc with replace (keep it as a text field, and double-click on the field definition and check auto-calculation, make sure "with replace":

Case(

field1 = 0; TextColor(field1; RGB(255;0;0));

field1 = 1; TextColor(field1; RGB(0;255;0));

TextColor(field1; RGB(0;0;0))

I hope that helps!

Nice ... but The Dog is vs. 6, Martha. I see no indication that they want this for vs. 7/8. :crazy2:

UPDATE: You can use a regular calculation and stack it on top of your standard field. Regular calculation would be formatted in your color (from field format level). Then calculation would be something like:

Case ( xx=0 ; theField )

In this way, it would show if the condition were true and no show if it wasn't true. Set the calc to not allow entry into field and make the border and fill transparent. Use Arrange to stack them precisely and make sure calc is on top (use Arrange > Bring to Front). When properly stacked, the calc will display on top of (appearing in place of) the standard field.

Woops I should have caught that. Thanks for pointing it out LaRetta!

No worry ... I've done it also. :wink2:

BTW, it's been awhile since I've used vs. 6 and the above isn't tested. But I'm pretty confident that's what I used to use.

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.