Newbies lukas421 Posted June 23, 2009 Newbies Posted June 23, 2009 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 )))
Fitch Posted June 23, 2009 Posted June 23, 2009 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 )) )
Newbies lukas421 Posted June 23, 2009 Author Newbies Posted June 23, 2009 Awesome! thank you, works great!
Fitch Posted June 24, 2009 Posted June 24, 2009 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now