Solved

Condiotional Formatting a Calculation Field

Posted on 2007-11-14
6
267 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
  • 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
ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Filemaker WebDirect Deployment 1 653
FM - Converting Fields to Records? 6 160
Filemaker 14 - Related tables 2 67
Help with getting the most recent date in FileMaker Pro 9 10 69
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…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

778 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