I thought this worked, but it does not

Jeff Harrison Jeff.Harrison at Epixweb.com
Mon Jun 14 12:36:07 PDT 2004


Ken Brody wrote:
[snip]

> What I'm saying is that you have two distinct totals being generated:
> 
> > > > :1 eq "T":aa=tot(6):
>                    ------  Contains the total of field 6 from those
>                            records where field 1 equals "T".
> 
> > > > :1 ne "T":aa=tot(7):
>                    ------  Contains the total of field 7 from those
>                            records where field 1 does not equal "T".
> 
> Remember, "aa=tot(6)" does not say "add the value of field 6 into aa",
> but rather "take the current running total of field 6 and 
> store it into
> field aa".  To say "only the last assignment is effective" would be a
> misstatement, just as it would to make that statement for this code:
> 
>     :1 eq "T":aa=6:
>     :1 ne "T":aa=7:
> 
> Obviously "only the last assignment is effective" in the 
> sense that each
> assignment replaces the contents of field aa.
> 
> -- 

Got ya.  I see where I was going wrong.  I was not looking at the tot as
assigning a running total, but rather I was looking at the dummy field and
assuming that it would accumulate the correct value based on the conditions
given.  It makes sense now.  Thanks.

Jeff Harrison
jeff.harrison at epixweb.com

Author of JHExport and JHImport - The fastest and easiest ways to generate
code for filepro exports and imports.  Demos available upon request.


More information about the Filepro-list mailing list