Jump to content

Indexed vs. Unstored?? Text color


 Share

This topic is 5754 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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) ) )

Link to comment
Share on other sites

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..."

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 5754 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.