Set text colour by value in field

I've been away for sometime so greetings to all at the best FM group on the
net. I've got a field containing numerical values ranging from -3 to +3 and
a want to set the text colour according to these values - red for -3 ranging
through to green for +3. Is there any way of achieving this. I run a script
to sort them by the value in this field so I can attach further lines to
this script or run a sub-script. All advice appreciated.

Regards, David



0
David
2/29/2004 11:39:12 AM
comp.databases.filemaker 10982 articles. 0 followers. amosw01 (46) is leader. Post Follow

2 Replies
489 Views

Similar Articles

[PageSpeed] 25

It is said that what you describe will be scriptable in FileMaker 7 later
this year. At present, it is a bit more complicated (without knowing what
the scripting will look like).

You have your field Value.

Define several calculation fields:

ValueMinus = If (Value < 0, Value, "")
ValueZero = If (Value = 0, Value, "")
ValuePlus = If (Value > 0, Value, "")

Place the three fields on your layout, identical in all formatting except
color, with transparent fill. Set each to the color of your choice (e.g.,
red for ValueMinus, black for ValueZero, green for ValuePlus. Align them on
top of each other and group them for easy positioning.

This method is obviously best suited for display (the Value field need not
even be on this layout). If you really want this to be the input layout as
well, put Value (again, identically formatted) behind the other three, and
use tabbing or a Go To Field step in a script to get into it for entry.

If you didn't want the three calculation fields, you could make them glabals
and, but you would have to use scripting to set and reset each according to
Value.

Matt




in article 4ck0c.7081$RB.4587@newsfe2-gui.server.ntli.net, David Price at
brynymor@ntlworld.com wrote on 2/29/04 6:39 AM:

> I've been away for sometime so greetings to all at the best FM group on the
> net. I've got a field containing numerical values ranging from -3 to +3 and
> a want to set the text colour according to these values - red for -3 ranging
> through to green for +3. Is there any way of achieving this. I run a script
> to sort them by the value in this field so I can attach further lines to
> this script or run a sub-script. All advice appreciated.
> 
> Regards, David
> 
> 
> 

0
Matt
2/29/2004 12:43:34 PM
Matt Wills <I'm@witz.end> wrote in message news:<BC6748A3.20C%I'm@witz.end>...

> Place the three fields on your layout, identical in all formatting except
> color, with transparent fill. Set each to the color of your choice (e.g.,
> red for ValueMinus, black for ValueZero, green for ValuePlus. Align them on
> top of each other and group them for easy positioning.

I tend to use a coherent string of 3 mergefields instead of the
layering approach Matt suggests, a trick to remember is just the first
"<" needs to carry each formatting.

Another issue is that if you're to show values that somehow have lost
their ability to be stored, say a portal line figure showing a pull of
a certain item deducted via a relation, could such freshing of
unstored values make a invoice/contract tiresom to watch building up.
Some kind of relookup mechanism could be instated by the entry of the
pull value ...bearing in mind that the colour shown is then FIFO...

--sd
0
sdyhr
2/29/2004 8:58:04 PM
Reply: