Associated fields and @AF

Kenneth Brody kenbrody at bestweb.net
Fri Jun 24 06:44:08 PDT 2005


Quoting Jay R. Ashworth (Fri, 24 Jun 2005 09:01:08 -0400):

> On Thu, Jun 23, 2005 at 08:55:12AM -0500, Chad McWilliams wrote:
> > > I think what you are missing (and perhaps this was not
> > > mentioned in the manual) is that you need to sort by the
> > > associated field for this to be effective.
> >
> > I'm not trying to disagree with you, but I don't understand what
> > sorting would have to do with the situation.  All the work is being
> > done within a single record, so, as I see it, sorting should have no
> > effect within the individual record.
>
> Because @AF *is not set by filepro* unless you sort on the associated
> field?  :-)  What @AF says is "which of the associated fields in the
> group is the one responsible for *this* appearance of this record in
> the temporary output sort file?"  If you don't sort by the associated
> field, it doesn't fill that it.  I'm surprised it's 1, I'd expect it to
> be 0... (which would throw an error, and thus be better).

It is also set in event handlers related to associated fields, such
as "@WLFA0".

Basically, you have to be doing something related to associated fields
in order for @AF to be set.  Simply putting an associated field on an
"if" line is not enough.

Also, while in an event related to an associated field, as someone
alluded to earlier, references to fields in that group will refer
to the specific instance, and not the entire group.

For example, in "@WLFA0", references "A0", "A1", "A2" and so on
will refer to the specific instance of that field based on the
instance of A0 which you just left.  That makes calculating the
extension price based on unit price and quantity quite simple, as
it would be something like "A3 = A1 * A2".

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list