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.

Script to automatically change text color

Featured Replies

I'm working on a database that tracks the ads placed in a publication. Some of the advertisers place ads in multiple editions, so I created an "edition" field to track which ones they appear in. But I would like all of the fields for listings that are older than 2 editions to appear in red so that I can easily distinguish at a glance which ones are old and which ones are still pending.

This is the script that I wrote using the text color function. Then I created a button for each record and set it to run this script. I know I would have to add the other fields to it, but I can't even get it to work on the one field.

If (Database::Edition ≠ "May" or "June" ; TextColor ( Database::Edition ; RGB ( 255 ; 0 ; 0 ) ) ; TextColor ( Database::Edition ; RGB ( 255 ; 255 ; 255 ) ))

I've never worked with the text color function, so I'm sure I'm using it wrong. Anyone have any ideas on how I can make this work, or some other way I can automatically distingush the old records from the new ones? I'm open to suggestions. As an alternative, I can have a new field that just calls them OLD, but I would prefer to have the listing change to a different color altogether.

Thanks.

Try:

If (Database::Edition ≠ "May" or Database::Edition ≠"June" ; TextColor ( Database::Edition ; RGB ( 255 ; 0 ; 0 ) ) ; TextColor ( Database::Edition ; RGB ( 255 ; 255 ; 255 ) ))

You don't need a script though. If you set all the fields that you want to change colors to Text Auto-Calc (with replacing), it should work too, and just put the above if statement as the Auto-Calculation. Make sure to replace "Database::Edition" which the name of the field you're making an auto-calc.

Just incase, you may want to back up your data for this one. It's not dangerous when it's in place. But if you accidently put the above calculation for the field "database::Title" then all your titles will be replaced with the edition field.

I hope this helps!!

:)

Martha

P.S. i attached a file with that concept in Topic#176709

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.