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.

change text color on 5 conditions

Featured Replies

  • Newbies

I'm using filemaker 7 adv, my users are on fm8

I need to change the text color of my "days" field, if the value meets specific conditions.

Days = <90 color green

Days = >90 color blue

days = <120 color yellow

days = <180 color orange

days = >270 color red

Heres what I tried so far. I'm not sure if i need if/else or if im on the right track just need alittle guidence. The code i have below was working for conditions 1 and 2 but thats it.

any help is appreciated.

thanks

Case ( days ≤ 90 ; TextColor (days ; RGB ( 51 ; 153 ; 0 ));

+ days > 91 ; TextColor ( days ; RGB ( 102 ; 0 ; 204 ));

+days ≥ 120 ; TextColor ( days ; RGB ( 255 ; 255 ; 0 ));

+days ≥ 180; TextColor ( days ; RGB ( 255 ; 153 ; 0 ));

+days> 270; TextColor ( days ; RGB ( 255 ; 0 ; 0 )))


Case ( 

  days > 270; TextColor( days ; RGB( 255 ; 0 ; 0 )) ;

  days ≥ 180; TextColor( days ; RGB( 255 ; 153 ; 0 )) ;

  days ≥ 120 ; TextColor( days ; RGB( 255 ; 255 ; 0 )) ;

  days > 91 ; TextColor( days ; RGB( 102 ; 0 ; 204 ))  ;

  TextColor(days ; RGB( 51 ; 153 ; 0 ))

       )

  • Author
  • Newbies

Awesome! thank you, works great!

Just remember that when you use a Case statement, as soon as one of the conditions is met, the statement stops evaluating. That's why you either have to start at the top using ">" and work your way down as I did, or start at the bottom using "<". You wouldn't use both.

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.