Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5642 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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 )))

Posted


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 ))

       )

Posted

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.

This topic is 5642 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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