Associated fields question

Jaime Perry jaime at hoovercs.com
Tue Mar 28 09:07:01 PST 2006


Hello,

I am having a problem with a report that is based on a file that 
contains several grouping of associated fields that can contain up to 10 
elements each.  I have included a screen shot of a record to use as an 
example.   My selection is based on a date range and the last three 
characters of the department field (which is a union code).  The date 
criteria is generic to the whole record (not associated, one field for 
this).  My sorts need to be union code, job number and employee code.
  
  RECORD NUMBER: 5
  EMPLOYEE CODE:  789

  DEPT          JOB NO.   COMP    COST CODE    RATE   TYPE       
HOURS      EXTENSION
  000D10       000000       DE953    5200¦ 000           39.50       R   
          8.00             316.00
  228D10       228000       DE953    5200¦ 000           39.50       
R             8.00             316.00
  243D10       243000       DE953    5200¦ 000           39.50       
R             8.00             316.00
  266D20       266000       DE953    5200¦ 000           39.50       
R             8.00             316.00
  274D10       274000       DE953    5200¦ 000           39.50       
R             8.00             316.00

My problem is that I need to select and sort the record for each 
instance where the union code matches the selection criteria.  In the 
above example, 4 of the 5 lines would pass (the D10 union codes).   I 
built an index on the job number associated field (J1) and this works 
fine as far as letting me select the record multiple times, but the real 
problem I am having is that I cannot determine which instance I am 
dealing with.  The index gives me this record 5 times but I only need 
4.  I need a way to determine the instance so I can filter out unneeded 
instances and pass the correct job number to the sort.  I thought @af 
would work, but it reports a "1" each time I hit the record.  I am not 
sure if @af is supposed to work in a selection process or not or if some 
environmental variable is set wrong/not set that affects @af.  If there 
is another way to select a record more than once, that would work as well. 

Thank you
Jaime Perry



More information about the Filepro-list mailing list