October 11, 200421 yr Seemed like a 50-50 chance on which forum to place this in. Suppose that you have a field, which you would like to turn red, if it goes over a specific amount. Is there anyway to change the color of that field with a calculation ?? what is the recommended/preferred way? thanks, J__
October 11, 200421 yr Case ( amount > specified_amount ; TextColor ( amount ; RGB ( 255 ; 0 ; 0 ) ); TextColor ( amount ; RGB ( 0 ; 0 ; 255 ) ) )
October 11, 200421 yr Author thanks so much i had looked at TextColor but I was thinking it should be a field name... i dunno, maybe I was half a sleep!! thanks for your help, really appreciate it. sincerely J__
October 12, 200421 yr Author One more thing though, I thought about this some... Where do you put this so that it gets executed? For example, I might have a field called Cost and then have a field called not_to_exceed_cost I want the cost to turn red. Problem is, it is a calculated field itself. What's the trick? thanks, J__
October 13, 200421 yr Author Where can I find that book?... ha ha ha.... unbelievable.. yes I'm tired. I actually have that book! and now that I am looking at the page, remember reading part of it. Ah, I get it. It's a calculated field - not a field with a calculation in it.... so, whenever any changes are made to the fields it references it recalculates. I know you are probably thinking this is obvious, but ... what can I say. On that same theme - suppose you have a field which you want to type in, say a customer number, and as you are typing that, have it update some fields right in the same layout you are in. Seems like a calculated field might be involved. But how would you lookup the data from a related table?... or any table for that matter? ever do this before? thanks for the help, i appreciate it greatly, sincerely, J__
October 14, 200421 yr Use an unstored calculated field dependent on the your customer number. The calculated field must be in the same table or in a related table (else how would it know to update?).
November 25, 200421 yr Anyone seen this before: The above works fine, but when you apply "Number Format" and "Format as Decimal" to the field the calculated colour stops being applied. I guess it's because the "format as decimal" has the ability to colourise answers black/red for positive/negative on its own. But I want a number like $1,234,567.89 to go red/blue if it's over/under a set amount. It works if I strip the dollar sign and thousands separators out, but I quite want to kep them. Any clues, guys? Alex
November 25, 200421 yr FM online help states, regarding TextColor, "Text formatting options will be lost if the data type that is returned is something other than text." You'll have to add a calculation that converts the number into the desired currency format in a text result.
December 11, 200421 yr Is there a calculation that at a push of a button the color of a field changes? If so, I was thinking it would be really nice to have themes persay. I have the book, I looked on that page. I just don't know how I would implement that into a button.
December 12, 200421 yr Well, both. I imagine if would be two seperate scripts. One for the text in a field. Another to change the background color of a text field. Is there a way to change the Background color of a container?
December 13, 200421 yr Check out this thread and then do a search for TextColor for information on changing field text.
Create an account or sign in to comment