Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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__

Posted

Case (

amount > specified_amount ; TextColor ( amount ; RGB ( 255 ; 0 ; 0 ) );

TextColor ( amount ; RGB ( 0 ; 0 ; 255 ) )

)

Posted

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__

Posted

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__

Posted

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__

Posted

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

  • 1 month later...
Posted

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

Posted

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.

  • 3 weeks later...
Posted

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.

Posted

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?

This topic is 7283 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
×
×
  • Create New...

Important Information

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