September 7, 200421 yr i have a calculation field that displays the balances of some numbers. the criteria are as follows: greater than 0: green smaller than 0: red equal to 0: blue now, TextColor works perfectly. however, if you happen to use "Number format" on the field, for example, adding a leading "$" sign. the TextColor function will fail to work. please try yourself and see if it so for you too. I am running on Windows 2003 enterprise server, Filemaker Developer 7v02. should this be considered a bug? but not being able to use the leading/trailing signs and number formats with TextColor is a great imperfection...
September 7, 200421 yr You can replace the field with a calculated text field to get the text color. I posted such a calculation about a month ago. Case ( Balance > 0; TextColor ( If ( Position ( Balance ; "." ; 1 ; 1 ) ; Left ( Balance & "00"; Position ( Balance ; "." ; 1 ; 1 ) + 2) ; Left ( Balance & ".00"; Position ( Balance & ".00"; "." ; 1 ; 1 ) + 2 )) ; RGB ( 255 ; 0 ; 0 ) ); Balance < 0 ; TextColor ( If ( Position ( Balance ; "." ; 1 ; 1 ) ; Left ( Balance & "00"; Position ( Balance ; "." ; 1 ; 1 ) + 2) ; Left ( Balance & ".00"; Position ( Balance & ".00"; "." ; 1 ; 1 ) + 2 )) ; RGB ( 0 ; 255 ; 0 ) ) ; TextColor ( If ( Position ( Balance ; "." ; 1 ; 1 ) ; Left ( Balance & "00"; Position ( Balance ; "." ; 1 ; 1 ) + 2) ; Left ( Balance & ".00"; Position ( Balance & ".00"; "." ; 1 ; 1 ) + 2 )) ; RGB ( 0 ; 0 ; 0 ) ) ) Adding $ signs requires a minor change.
September 8, 200421 yr GetAsnumber does not change the result. Definitely a bug. If number formatting negates text formatting then there should be a text formatting option to apply the number formats such as currency , percentage etc.
September 8, 200421 yr I misunderstood your post. It appears that "Number Format" wipes the calc'ed "TextColor()" formatting (or anything else too, it is an after the fact formatting). Too bad there isn't a "Currency()" function to add into the formatting mix.
Create an account or sign in to comment