Deep Thought II Posted September 7, 2004 Posted September 7, 2004 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...
rogermax Posted September 7, 2004 Posted September 7, 2004 Have you tried adding in the GetAsNumber() function?
RalphL Posted September 7, 2004 Posted September 7, 2004 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.
SpudMan Posted September 8, 2004 Posted September 8, 2004 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.
rogermax Posted September 8, 2004 Posted September 8, 2004 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.
Recommended Posts
This topic is 7643 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