Problems with Sort/Selection processing on associated fields.

Boaz Bezborodko boaz at mirrotek.com
Thu Feb 12 09:57:05 PST 2009


I'm trying to do a sort selection on a file where the selection goes 
through each record multiple times based on the associated field.  Since 
the sort is also based on a date I want to to speed things up by going 
through the records based on an index that has the date field as the 
first field in the index and that associated field as the second.  But 
when the Sort/Selection processing table goes through each record it 
only ever sees the first instance of the data in the Associated field.  
So each record only ever reports the first associate field as 'A1'.  All 
the others never appear even though the process will see as many records 
as there are associated fields.

For example:
Say I have a file where record 1 is a date field and records 10 through 
19 are A1.  I set up an index on record 1 and A1.  If I have a record 
with 5 items, one each in fields 10 through 14, the processing table 
will go through 5 records, but A1 in each instance will always be the 
contents of field 10.

I can make a workaround that counts each instance and then sets @af 
before doing the check or by overlaying an array and checking the nth 
occurrence in the array, but it seems to me that if the index is based 
on an associated field then that instance of the record should have A1 
set to that associated field and not just the first one.

Am I simply doing something wrong that I'm not aware of?

Boaz


More information about the Filepro-list mailing list