Associated fields question (Jeff Harrison)

Boaz Bezborodko boaz at mirrotek.com
Thu Mar 30 08:22:27 PST 2006


--- Jaime Perry <jaime at hoovercs.com> wrote:

>  
>
>>Jeff Harrison wrote:
>>    
>>
>>>--- Jaime Perry <jaime at hoovercs.com> wrote:
>>>
>>>  
>>>
>>>The description of what you are trying to do is
>>>      
>>>
>>not
>>    
>>
>>>totally clear to me.  
>>>      
>>>
>>I know, it is not easy to explain. I retyped my
>>initial post quite a few 
>>times trying to get it to make sense.
>>
>>    
>>
>>>However, I believe that if you
>>>want to use the @af in selection processing you
>>>      
>>>
>>need
>>    
>>
>>>to sort on the associated field, and associate
>>>      
>>>
>>that
>>    
>>
>>>sort with your output format.  The easiest way to
>>>      
>>>
>>do
>>    
>>
>>>that would be to just enter the associated field
>>>      
>>>
>>name
>>    
>>
>>>as the primary sort on the output format.
>>>
>>>  
>>>      
>>>
>>I do have a sort built on the associated field.  As
>>far as I can tell, 
>>this part is working fine.  My problem is
>>determining which instance of 
>>a record I am processing as I process the records. 
>>If  I have a record 
>>with 5 associated elements, that record will
>>(should) be in the index 5 
>>times.
>>    
>>
>
>That is true if you have all of the elements filled in
>for the associated field upon which you are sorting.
>
>  
>
>> If I turn the debugger on for that record
>>only, the debugger 
>>starts 5 times which is good.  However, @af is
>>always "1" so I cannot 
>>tell if it is the first, second, whatever time I am
>>hitting that 
>>record.  I would expect @af to be "1" the first time
>>I encounter the 
>>record, "2" for the second, etc through the end.  If
>>it did that, I can 
>>just use an array and say jobnumber[@af] and be
>>golden.
>>
>>
>>    
>>
>
>@af would not be "1" necessarily, the first time you
>encounter the record.  The @af value will correspond
>to the "row number" within the associated field
>grouping.  For example if you had A0) as your
>associated field group in your map as follows with the
>following values for record #1:
>
>Field #   Group     Value
>1         A0)       BBB
>2         A0)       BBB
>3         A0)       AAA
>
>If you sort the output by A0) then @af will be "3" on
>the first record when you are processing the "AAA"
>value.  This is because it is the third instance of
>A0) in the map.
>
>You should certainly not be getting "1" for all of the
>values of @af, unless you are only using the first
>instance of the "row" in you map. 
>
>Jeff Harrison
>jeffaharrison at yahoo.com
>
>Author of JHExport and JHImport.  The easiest and
>fastest ways to generate code for filePro exports and imports.
>  
>
>  
>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.celestial.com/pipermail/filepro-list/attachments/20060330/172c4c49/attachment-0001.html


More information about the Filepro-list mailing list