Associated fields question (Jeff Harrison)

Jeff Harrison jeffaharrison at yahoo.com
Thu Mar 30 11:06:10 PST 2006


--- Boaz Bezborodko <boaz at mirrotek.com> wrote:

> Jeff Harrison wrote:
> 
> >--- Boaz Bezborodko <boaz at mirrotek.com> wrote:
> >[snip]
> >  
> >
> >>> 
> >>>
> >>>      
> >>>
> >>I have a few questions regarding associated fields
> >>in a report.
> >>
> >>What happens if the associated field you're trying
> >>to determine is not
> >>the primary sort? 
> >>
> >>What if there are two different associated fields
> in
> >>the sort? 
> >>
> >>Is there a way to determine which instance is
> being
> >>dealt with?
> >>
> >>Thanks in advance.
> >>
> >>Boaz
> >>    
> >>
> >
> >
> >Good questions.  
> >
> >#1  I tried a simple test and it appears that the
> >record is not included multiple times in the output
> >unless the associated field is the primary sort.
> >
> >#2  I tried a simple test using two associated
> fields
> >a0) and a1) with three instances (rows) in the data
> >for each record.  I used a0 as the primary sort and
> a1
> >as the secondary sort.  When I ran the report each
> >record appeared 3 times in the output - which is
> the
> >behaviour that I was hoping for - and it was
> >automatically sorted by the a0) value.  For each a0
> >value that was the same, I could see that the
> >secondary sort was applied properly.
> >
> >#3  Yes, @af tells you the proper instance that you
> >are dealing with.
> >
> >Jeff Harrison
> >jeffaharrison at yahoo.com
> >
> >Author of JHExport and JHImport.  The easiest and
> >fastest ways to generate code for filePro exports
> and
> >imports.
> >  
> >
> In #3 is there a way to tell which instance of the
> secondary sort is
> being dealt with?
> 
> Thanks again,
> Boaz
> 
> 

Well, if the two associated field names that you are
dealing with are in the same group such as A0 and A1
then the @af will be the same for the primary sort as
for the secondary sort.  @af = "2" means that you are
dealing with the 2nd instance of A0 in your map - you
would then be dealing with the 2nd instance of A1
also.  

If you are dealing with two different groups such as
A0 and B0, then the @af will refer to the instance of
just the A0.  You would be on your own to figure out
which instance of the secondary sort you are dealing
with, I guess.

Jeff Harrison
jeffaharrison at yahoo.com

Author of JHExport and JHImport.  The easiest and
fastest ways to generate code for filePro exports and
imports.



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Filepro-list mailing list