dbTalk Databases Forums  

Merge Field Number Format Color Problem

comp.databases.filemaker comp.databases.filemaker


Discuss Merge Field Number Format Color Problem in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
robdsteward@gmail.com
 
Posts: n/a

Default Merge Field Number Format Color Problem - 06-10-2007 , 04:33 PM






Hi,

I'm converting an FMP6 solution to FMP8.5.

On one layout is the following merge field setup:

Charges: <<gStatementTotalCharges>> Credits:
<<gStatementTotalCredits>>

The data being merged will be in red text if the amount is negative,
or black if it is positive. The words "Charges:" and "Credits:" need
to always be black. This works perfectly in FMP6.

In FMP8.5, it doesn't work as expected. If either of the merged
numbers are red text, then the whole thing turns red, including
"Charges:", "Credits:"... and even the other number, whether it is
negative or not.

I tried searching Google Groups, thinking this would have been seen
before, but didn't come up with anything. I can think of some
workarounds, but I'd like to know why it's not working as expected.

I've created an example: http://myweb.cableone.net/steward/colorproblem.fp7.zip

Ideas? (And thanks!)
-Rob Steward


Reply With Quote
  #2  
Old   
Ursus
 
Posts: n/a

Default Re: Merge Field Number Format Color Problem - 06-11-2007 , 07:47 AM







<robdsteward (AT) gmail (DOT) com> schreef in bericht
news:1181511185.069346.130460 (AT) m36g2000hse (DOT) googlegroups.com...
Quote:
Hi,

I'm converting an FMP6 solution to FMP8.5.

On one layout is the following merge field setup:

Charges: <<gStatementTotalCharges>> Credits:
gStatementTotalCredits

The data being merged will be in red text if the amount is negative,
or black if it is positive. The words "Charges:" and "Credits:" need
to always be black. This works perfectly in FMP6.

In FMP8.5, it doesn't work as expected. If either of the merged
numbers are red text, then the whole thing turns red, including
"Charges:", "Credits:"... and even the other number, whether it is
negative or not.

I tried searching Google Groups, thinking this would have been seen
before, but didn't come up with anything. I can think of some
workarounds, but I'd like to know why it's not working as expected.

I've created an example:
http://myweb.cableone.net/steward/colorproblem.fp7.zip

Ideas? (And thanks!)
-Rob Steward

IMHO
The simplest would be to create four different text blocks and align them in
the way you need.

Keep well, Ursus




Reply With Quote
  #3  
Old   
robdsteward@gmail.com
 
Posts: n/a

Default Re: Merge Field Number Format Color Problem - 06-11-2007 , 11:09 AM



On Jun 11, 6:47 am, "Ursus" <ursus.k... (AT) wanadoo (DOT) nl> wrote:
Quote:
robdstew... (AT) gmail (DOT) com> schreef in berichtnews:1181511185.069346.130460 (AT) m36g2000hse (DOT) googlegroups.com...



Hi,

I'm converting an FMP6 solution to FMP8.5.

On one layout is the following merge field setup:

Charges: <<gStatementTotalCharges>> Credits:
gStatementTotalCredits

The data being merged will be in red text if the amount is negative,
or black if it is positive. The words "Charges:" and "Credits:" need
to always be black. This works perfectly in FMP6.

In FMP8.5, it doesn't work as expected. If either of the merged
numbers are red text, then the whole thing turns red, including
"Charges:", "Credits:"... and even the other number, whether it is
negative or not.

I tried searching Google Groups, thinking this would have been seen
before, but didn't come up with anything. I can think of some
workarounds, but I'd like to know why it's not working as expected.

I've created an example:
http://myweb.cableone.net/steward/colorproblem.fp7.zip

Ideas? (And thanks!)
-Rob Steward

IMHO
The simplest would be to create four different text blocks and align them in
the way you need.

Of course, I oversimplified the question. There are actually about 10
or so such numbers/merge fields on this layout. Separate text boxes
will be complicated and mess up some of the alignment.

This behavior of turning the entire text box red (and not just the
merged number itself) has to be a bug... doesn't it? What if you had a
business letter with a number merged in the middle of the letter body?
If the number was negative, the entire letter would turn red.

I'd hope FileMaker would fix this, but the behavior is in version 7.0
as well. (Though, there, I found a workaround--make the "regular" text
99% black, but that doesn't work in FMP8.5. Grr.)

-Rob




Reply With Quote
  #4  
Old   
VoicesInMyHead
 
Posts: n/a

Default Re: Merge Field Number Format Color Problem - 06-11-2007 , 12:23 PM



Quote:
Ideas? (And thanks!)
-Rob Steward
I updated your test DB file and if you want to see what I did, it's
at
members.cox.net/voicesinmyhead/fmp/colorproblem_solved.fp7

Maybe not a perfect solution, but it works...

1) Under "Number Format", I removed the check from "Use Color"

2) I created 2 new calc fields that format the number color "outside"
of the text block formating. Use these new fields as your merge
fields:

number1a / Calculation / Number Result
If(number 1 < 0 ;
TextColor(number 1 ; RGB(255;0;0)) ;
TextColor(number 1 ; RGB(0;0;0)))

number2a / Calculation / Number Result
If(number 2 < 0 ;
TextColor(number 2 ; RGB(255;0;0)) ;
TextColor(number 2 ; RGB(0;0;0)))

So, you could even specify your text block to be Blue, but if the
number is a negative, it will turn Red.

Take a look at "Text formatting functions" in the help file
(specifically, TextStyleAdd function
to add a bold to the positive or to the negative... lots of stuff you
can do to the text output.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reality is the leading cause of stress...
....amongst those in touch with it.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
WinXP Pro 64Bit / FMP Adv 8.5v2
VoicesInMyHead
a.k.a. The Voices
No, we're not... Yes, we are...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



Reply With Quote
  #5  
Old   
robdsteward@gmail.com
 
Posts: n/a

Default Re: Merge Field Number Format Color Problem - 06-11-2007 , 03:08 PM




Quote:
I updated your test DB file and if you want to see what I did, it's
at
members.cox.net/voicesinmyhead/fmp/colorproblem_solved.fp7

Maybe not a perfect solution, but it works...
Thanks.

Obviously, adding 7 or so additional calculations to the table just
for text formatting isn't something I'm thrilled about. A merge field
ought to "just work"... and it *did* up until FMP7.

How, exactly, do we report bugs to FileMaker? Or do they prefer not to
be bothered with such things? :-/

-Rob



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.