Thanks to everyone for the help you provided.  I have changed the
calculation in my field definitions to reflect a Case statement and have
made the calculation easier to read.  I appreciate the heads up on that
tip.  I also made sure the field doesn't display text if the value is
zero and that seems to solve the problem sufficiently. 

Thanks to everyone.

-Aaron 

-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Ross Dickson
Sent: Wednesday, April 20, 2005 1:29 PM
To: Filemaker Experts
Subject: Re: Calc. Help

Aaron
I don't see anything wrong with your formula, except for the extra close
bracket at the end. However, for this kind of calculation I prefer to
use Case instead of If. This avoids the need to include a result for
when the condition is false, and ensures the field is left unsullied.
Thus:

  DebitAmt(number) =
  Case(
   TransType = "Teleconference Tape-Jan" or
   TransType = "Teleconference Tape-Feb" or
   TransType = "Teleconference Tape-Mar" or
   TransType = "Teleconference Tape-Apr" or
   TransType = "Teleconference Tape-May" or
   TransType = "Teleconference Tape-Jun" or
   TransType = "Teleconference Tape-Jul" or
   TransType = "Teleconference Tape-Aug" or
   TransType = "Teleconference Tape-Sep" or
   TransType = "Teleconference Tape-Oct" or
   TransType = "Teleconference Tape-Nov" or
   TransType = "Teleconference Tape-Dec" ; 0)

Even simpler might be

  DebitAmt(number) =
   Case(PatternCount(TransType; "Teleconference Tape-"); 0)

Ross

Aaron Woitkovich wrote:
> I have a simple calculation that I need assistance with, it is below:
> 
> DebitAmt =
> 
> If(TransType ="Teleconference Tape-Jan" or TransType = "Teleconference

> Tape-Feb" or TransType = "Teleconference Tape-Mar" or TransType = 
> "Teleconference Tape-Apr" or TransType = "Teleconference Tape-May" or 
> TransType = "Teleconference Tape-Jun" or TransType = "Teleconference 
> Tape-Jul" or TransType = "Teleconference Tape-Aug" or TransType = 
> "Teleconference Tape-Sep" or TransType = "Teleconference Tape-Oct" or 
> TransType = "Teleconference Tape-Nov" or TransType = "Teleconference 
> Tape-Dec" ; 0; ""))
> 
> I am using FM7 hosted by an FM7 server running on WIN2K SP4.
> 
> The calculation seems to work fine, but this is the issue I am running

> into.  When the TransType = "payment" or anything not mentioned above 
> I want the DebitAmt field to be equal to nothing.  In FM5, this 
> calculation would leave the actual debitAmt field blank, now it 
> inserts a zero.  So, essentially the end of the calculation would look

> like
> this:
> 
> or TransType = "Teleconference Tape-Dec" ; 0; 0)).
> 
> 
> I really need the field to appear blank ("") if one of those 
> transtype's is not selected.  Please advise.
> 
> Thanks for the help.
> 
> -Aaron

--
To unsubscribe: send an email to <[EMAIL PROTECTED]>
FMPexperts is hosted by Ironclad Networks <http://www.ironclad.net.au/>



--
To unsubscribe: send an email to <[EMAIL PROTECTED]>
FMPexperts is hosted by Ironclad Networks <http://www.ironclad.net.au/>

Reply via email to