Could this be a bug in FilePro? (Was--Weird output with associatedfield)

Boaz Bezborodko boaz at mirrotek.com
Tue Jan 29 20:02:56 PST 2008


I just modified the -bg to -ng and I still have the same problem.

Boaz

ken white wrote:
> I just tried it with an additional field in my sort criteria also 
> without issue.
>
> change your -bg  to -ng on the lookup - in the start,  and -nl on the 
> lookup - on  when the date is > then your end date.
>
> ----- Original Message ----- From: "Boaz Bezborodko" <boaz at mirrotek.com>
> To: "ken white" <kenwhite at verizon.net>
> Sent: Tuesday, January 29, 2008 10:06 PM
> Subject: Re: Could this be a bug in FilePro? (Was--Weird output with 
> associatedfield)
>
>
>> aa and ag are just additional (but optional) selection criteria.
>>
>> But I don't see how your code is operationally any different from my 
>> code especially when it comes to the beginning of the indexed set to 
>> be chosen. In my case I select the record I want to see, but only the 
>> first associated field is put on the report.  If I understand the way 
>> FP is supposed to work, all associated fields are supposed to be in 
>> the selection set when the record is selected, not just the first one.
>>
>> (I will have to change or XLATE ai to (8,mdy/) as that is the format 
>> for O, but it would only be an issue in ending the selection process, 
>> not in the beginning of it.)
>>
>> Boaz
>>
>> ken white wrote:
>>> Boaz,
>>>
>>> Rewrite your sort selection table to be close to the following:
>>>
>>> :ba="":gosub getsel:
>>> :20 lt ba:lookup - k=ba i=O -ng:
>>> :20 gt bb:gosub fini:
>>> :20 lt ba or 20 gt bb:end     'safety:
>>> :ag ne "" and ag ne 17:end:
>>> :MID(30,"1","13") eq "Keyoffs check":end:
>>> ::'any other criteria which could end the selection criteria is 
>>> inserted here:
>>> :aa="" and 19 ne "AD":select:
>>> ::end:
>>> ::':
>>> fini::'get the last record in the index:
>>> :ai ne "":return   'already ran once, incase of multiple values in 
>>> the index.:
>>> ::ai(10,mdyy/,g)="12/31/2050":
>>> :: lookup - k=ai i=O -nl:
>>> ::return:
>>> ::':
>>> getsel::'all selection questions are located in this routine.:
>>> ::input popup ba "Enter Start Date > ":
>>> :@sk="BRKY":exit:
>>> :ba="":goto getsel:
>>> ::input popup bb "Enter End Date > ":
>>> :@sk="BRKY":exit:
>>> :bb lt ba:goto getsel:
>>> ::return:
>>> ::':
>>>
>>> The point being that the first couple of lines evaluate the position 
>>> of the date in index O.  After the dates are validated all other 
>>> selection criteria is then validated and the record is selected or 
>>> not.  I do not know from your sample what is contained in the fields 
>>> AA or AG and where they are set.
>>>
>>> Another issue you need to pay attention to is the -ng and -nl on the 
>>> lookup - lines.   You do not want filepro to return an error when 
>>> the begin date or end date does not exist.   The -nl in the fini 
>>> sub-routine causes filepro to find the last record in the date index.
>>>
>>> I am also assuming that index O is built on a 10, mdyy/ data field 
>>> and not 10,yymd or any other date variant, and that it is actually a 
>>> date.
>>>
>>>
>>>
>
>


More information about the Filepro-list mailing list