rayh34 Posted December 24, 2006 Posted December 24, 2006 I'm stuck. I am trying to get a "target" Field to display the field value in red, if the target is a client. Otherwise display in blue. I created a test field to test it below, and it works great; [color:green]Field Name = Targettextcolor Type=Calculation Options=Unstored, from URL Stagina Area,= Case ( IID Client? = "YES" ;TextColor (Target; RGB ( 200 ;0 ;0 ) ) ;TextColor (Target; RGB ( 0 ;0 ;200) ) ) But, when I try it on the actual field, it is displaying the field in blue, as the records are coming in, but can not get it to ever display in red. Got an idea that it's due to it being indexed, but not sure, and how do I get around it? [color:green]Field Name = Target Type=Text Options=Indexed, Auto-enter Calculaton, Always Validate, By Value List, Message Case ( IID Client? = "YES" ;TextColor (Calc Target ; RGB ( 200 ;0 ;0 ) ) ;TextColor (Calc Target ; RGB ( 0 ;0 ;200) ) )
mr_vodka Posted December 27, 2006 Posted December 27, 2006 If you want the text in the target field to change its color when the value of 'IID Client' changes, then just have your auto entered calculated value with the formula. Case ( IID Client = "YES"; TextColor (Target ; RGB ( 200 ;0 ;0 ) ); TextColor (Target ; RGB ( 0 ;0 ;200) ) ) Make sure you uncheck the 'Do not replace existing value..."
rayh34 Posted December 28, 2006 Author Posted December 28, 2006 The field "Target" has to pull it's value from "Calc Target" and "Target" is being displayed as a drop down list so that the user can change it if it's incorrect, or blank.
rayh34 Posted December 28, 2006 Author Posted December 28, 2006 I tried using: Target = "calc target" & Case ( IID Client? = "YES" ;TextColor (Target; RGB ( 200 ;0 ;0 ) ) ;TextColor (Target; RGB ( 0 ;0 ;200) ) ) But didn't quite work.
mr_vodka Posted December 28, 2006 Posted December 28, 2006 What is "calc target" exactly defined as? Could you explain why you are trying to do this? I feel that you may be approaching your interface in a wrong way. Meanwhile... change_text_color.zip
LaRetta Posted December 28, 2006 Posted December 28, 2006 John is right - I'd question what you are doing. The field "Target" has to pull it's value from "Calc Target" and "Target" is being displayed as a drop down list so that the user can change it if it's incorrect, or blank. But you indicate Calc Target is unstored. Why? If it uses data from another relationship or uses 'most' of the Get() functions then it MUST be unstored. And auto-enter fields can't change based upon unstored calculations. You need to explain the purpose here and what Calc Target's calculation looks like. Update: I suggest you put your Calc Target formula directly into Target Text. LaRetta
rayh34 Posted December 29, 2006 Author Posted December 29, 2006 Mr. Vodka, Your attached file is really close to thae way things are set up. Did figure out the problem, You said in your first reply to make sure that 'Do not replace existing value..." needed to be unchecked. In your example it made the difference. The field "Target" is used in some many areas, that I need to make sure that changeing that toggle will not cuase a prob. And just to answer the question: "Calc Target" Calculation Unstored, From URL Staging Area, = Lookup (Target Name Creation2::Target Name) Thank you very much for your help.
rayh34 Posted January 3, 2007 Author Posted January 3, 2007 Ok, unfortunatly it couldn't be as easy as unchecking the "Do not Replace existing Value" box. Because then my drop down box will no longer replace the existing vaule in the "target" field. It just reverts back.
LaRetta Posted January 3, 2007 Posted January 3, 2007 Consider an unstored calculation field. If it references a related table, it will never update a standard field. Only unstored calculations can *see* other table values change because they recalculate in the moment they are displayed.
rayh34 Posted January 3, 2007 Author Posted January 3, 2007 So then I would have to do something like: "UnstoredTarget" = "Target" Substitute "UnstoredTarget" in field Then regrab new value if any: "Target" = "UnstoredTarget" There just seems like there would be some way to force a comparision in the field calculation.
LaRetta Posted January 3, 2007 Posted January 3, 2007 Is this the actual field name? [color:green]IID Client? = "YES"
mr_vodka Posted January 3, 2007 Posted January 3, 2007 Do you have a copy of your file that you can post? There seems to be some confusion on what you are trying to do here as well as some of the names. BTW, I personally would rename some of your fields to not use characters other than alpha.
rayh34 Posted January 3, 2007 Author Posted January 3, 2007 Yea, I will try to post it this afternoon. Just make sure you are wearing your anti-headache googles before looking at it.. It's been known to instantly inflict headaches by merely opening.
rayh34 Posted January 3, 2007 Author Posted January 3, 2007 Although, would you two, mind if I sent it directly via email to you to look at, don't feel comforatable about giving the general public a headache?
Recommended Posts
This topic is 6595 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