rwc.sheehan Posted July 9, 2004 Posted July 9, 2004 I want the text color of field X to be dependent on which of two values is present in field Y. It should be simple but I'm super busy right now and not thinking straight. Any Suggestions? Thanks
MoonShadow Posted July 9, 2004 Posted July 9, 2004 A search would display many posts on the subject. One such post is: Conditionally Color Text
spb Posted July 9, 2004 Posted July 9, 2004 That post seems to refer to a TextColor function, which is to be found in FM7. It looks like the original poster is working in FM6. There are many ways to do this, but as I happened to just finish setting something like this up, here's what I did. (I assume that the resulting field X is for display only and that data will not be entered into it. If this is not the case, follow Moonshadow's advice & search. There are lots of different ways to do the job.) I made two calculation fields, result text (I am displaying a message). Let's say the two values that can be in field Y are A and B. Make the calculation for the first new field, call it X_A: Case (Field_Y = "A", "Red Text", "") The second field, X_B would be: Case (Field_Y = "B", "Blue Text, "") Format field X_A the font & size you wish, and select the text color to be red. Use for format painter and copy the X_A formatting to X_B, then reselct the text color to be blue. Make sure both fields (in layout mode) are exactly the same size. Put one exactly on top of the other. Now, in browse mode, change the contents of Field Y and watch the double field X change. As I said, if field X is to have actual data, this can be done but it's a bit trickier. Easy if data doesn't need to be directly entered, tougher if it does. Steve Brown
-Queue- Posted July 9, 2004 Posted July 9, 2004 Note that Case (Field_Y = "A", "Red Text") will work as well, without the superfluous alternate null result.
MoonShadow Posted July 9, 2004 Posted July 9, 2004 Apologies for not noticing your version. I am usually more careful about offering suggestions based upon version. I guess my head is so much in 7 that I momentarily forgot there is another world out there.
Recommended Posts
This topic is 7511 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