Solved

Condiotional Formatting a Calculation Field

Posted on 2007-11-14
6
270 Views
Last Modified: 2010-05-18
I am running Filemaker Pro v8.5 under Win XP.
How can I conditionally colour the output of a Calculation Field?

I have been using the following formulation (kindly received from this forum) to conditionally colour the text in a Text input field.  I use the Auto-enter Calculation Tab, then declick the do not replace existing value.

Case(Field="U";Colour Choice[1];
Field="D";Colour Choice[2];
"")

It works well, but I have not found a way to use the idea in a Calculation Field, which (obviously) already has a calculation in it.  I have tried using "AND" after the original calculation formula, and then inserting this idea, but I cannot get it to work, and it seems in fact to mess up the recalculation of the calculation field when that is otherwise necessary.

Would appreciate guidance.
0
Comment
Question by:aws148
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 28

Expert Comment

by:lesouef
ID: 20288070
give me yr calc formula, I'll modify it to get it coloured.
and tell me the criteria to switch colours depending on the calc. value
0
 

Author Comment

by:aws148
ID: 20288197
Thanks.
The calculation formula is simply Number Field 1 - Number Field 2
I want to colour RED when result is <0.1 and BLUE when result is >0
0
 
LVL 28

Accepted Solution

by:
lesouef earned 500 total points
ID: 20289028
this won't work, there is an overlap in between 0 and 0.1
if that would be red for negative and blue for 0 and positive values:

result=
If ((number1 - number2) < 0 ;
TextColor ( number1 - number2; RGB ( 255; 0; 0) ) ;
TextColor ( number1 - number2; RGB ( 0;0; 255) )
)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:aws148
ID: 20307121
Sorry for delay, I was called away to do some firefighting.
Thanks for the proposal, but I don't fully understand it.
I want this Calculation field (a) show the result of the calculation, which will be an integer, and (b) to colour the result red or blue.
As I understand your code it only does (b).
Could you clarify?
Thanks
0
 
LVL 28

Expert Comment

by:lesouef
ID: 20308266
no, fm is quite clever on this, you can still manipulate the coloured expression as a number.
of course, the colour attribute will be lost in a further calculation, but you have nothing to do, it does a kind of automatic getasnumber() function on it if you use it a further calculation
0
 

Author Comment

by:aws148
ID: 20311929
Well that's a surprise.  I'd never have guessed that, but can confirm that it's working for me.
Thanks very much
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question