June 23, 200916 yr 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 )))
June 23, 200916 yr 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 )) )
June 24, 200916 yr 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