dbTalk Databases Forums  

Conditional text formatting?

comp.databases.filemaker comp.databases.filemaker


Discuss Conditional text formatting? in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rick Altman
 
Posts: n/a

Default Conditional text formatting? - 05-21-2007 , 04:06 PM






Is there any way to format a field based on data in another field? In other
words:

If Field X is "No" Color of Field Y is to be Red.


Thanks...





Rick A.
Pleasanton CA



Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Conditional text formatting? - 05-22-2007 , 01:13 AM






In article <QZSdnRILUrV4lM_bnZ2dnUVZ_qupnZ2d (AT) comcast (DOT) com>, "Rick
Altman" <rick.a (AT) NOSPAMaltman (DOT) com> wrote:

Quote:
Is there any way to format a field based on data in another field? In other
words:

If Field X is "No" Color of Field Y is to be Red.


Thanks...
It depends what you mean by "another field" and "change color", and
what version of FileMaker you're using.

In very basic terms for older versions of FileMaker (that works in all
versions), then it's not possible to change a field's colour at all. If
all you need to do is highlight colour behind a field, then you can use
a Global COntainer field and a Calculation field with a Container
result.
eg.
g_BackgroundColour Global, Container

Field_Y_Highlight Calculation, Container Result, Unstored
= If (Field_X = "No", g_BackgroundColour, "")

Into the g_BackgroundColour field paste a small rectangle of the
appropriate colour.

Put the Field_Y_Highlight field behind Field Y on the Layout, and
format it to expand the graphic. Then whenever Field X contains "No",
the calcuation will display the small coloured rectangle. When Field X
does not contain "No" the calculation leaves the field empty.

In newer versions of FileMaker you may be able to do more fancy tricks
using other techniques.


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #3  
Old   
Matt Wills
 
Posts: n/a

Default Re: Conditional text formatting? - 05-22-2007 , 09:07 AM





On 05/21/2007 17:06:44 "Rick Altman" <rick.a (AT) NOSPAMaltman (DOT) com> wrote:

Quote:
Is there any way to format a field based on data in another field? In
other words:

If Field X is "No" Color of Field Y is to be Red.

Thanks...

Rick A. Pleasanton CA
It isn't possible to change the background color of a field, except through a trick with a calculated container field. See http://www.virtualvermont.com/FMP/VisualFlag.fp7.zip for an example. If you need it in .FP5, let me know.

As for changing text color (font, style and size), that's a relatively recent addition to FM. The simplest thing would be to look at the Functions Reference (Category List) in Help. If you have a group of Text Formatting functions, then yes, you have a version of FMP that can do it, and there are your instructions.

Matt


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.