Associated fields and @AF

Nancy Palmquist nlp at vss3.com
Thu Jun 23 08:33:37 PDT 2005


Chad McWilliams wrote:
>>Unless this is a very old version, you reference the associated field 
>>with a Letter and a number D0 to D9 where the old d) would be 
>>called d0) 
>>now.  You do not have to change the map to have this work.
>>
>>if: d0 co "O" will match to the first and only the first d0 
>>that has a O 
>>as any part of it.  If more than one d0 meets the criteria, this will 
>>never find it.
>>
>>Nancy
>>
> 
> 
> I was using d) due to what I read in STN's filePro Developers Reference that
> stated A) is treated as A0).
> 
> Anyway, I switch everything over to D0), and it still doesn't work.  While
> it finds the records that have "O" in one of the associated fields, @AF
> always returns 1.  I've tried this on SCO *report 4.8.11D4 and FreeBSD
> *report 5.0.13D4.
> 
> In my map I have two groups of associated fields: d0) and d1).  I want to
> find the code "O" in d0, and the corresponding value in d1) using @AF.  The
> way I understand it that if O is in the 3rd associated d0) field, then @AF=3
> which I can use as an index to an array overlayed over the group of d1)
> fields.
> 
> I had to resort to running through the group of fields manually to
> accomplish this, but thought it should work the way I was originally trying.
> 
> Thanks for the info.
> 
> -Chad McWilliams
> 
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 
> 
I have used the logic as you described many times.  I did a test using 
dclerk 5.0.14 with a result as follows:

fpinvc using fields a2 (Quantity)

if: a2 eq "1"
then: msgbox "Quantity eq 1 @af="<@af
if: a2 co "1"
then: msgbox "Quantity Co 1 @af="<@af

You are right in all cases the value of @af was 1, even if the match was 
on the second or third item.

It did correctly stop on the two items finding only values of 1 for the 
first match and any quantity that contained a 1 for the second.

In situations where you use @wlfa2, sort on a2, use and index built on 
a2, I am sure the @af is correctly set.

Nancy
-- 
Nancy Palmquist 		MOS & filePro Training Available
Virtual Software Systems	Web Based Training and Consulting	
PHONE: (412) 835-9417		   Web site:  http://www.vss3.com



More information about the Filepro-list mailing list