Browse lookup field not found error

Bruce Easton bruce at stn.com
Mon Jan 19 12:39:38 PST 2015


Good point.  Since he is seeing a difference in behavior, I think being 
that his wizard-defined browse lacks the "drop" processing, there is 
more likelihood of that deficiency making itself known  (because of 
exiting from the browse from different data shown in the browse).    But 
yes - I would think he should even get the error when cancelling from 
the browse from not checking 'not tran'.  Of course we are not seeing 
all the code - maybe he has break turned off.

Bruce

On 1/19/15 2:40 PM, Craig Tooker wrote:
> Could it be that the lookup is not finding a valid record?
>
> You are not checking to see if the lookup succeeds.  On the line after 
> the lookup you need a 'not tran' (check failure condition) that will 
> preclude any reference to 'tran'.  This is required because you used 
> the 'n' flag to lookup which tells filePro that you are going to deal 
> with lookup failures.
>
> Craig
>
> On 01/19/15 12:47, Richard Kreiss wrote:
>> Windows
>>
>> Filepro 5.7.03.07
>>
>> I have the following code for a browse lookup which when executed 
>> displays the field not found error at an @bk when the option has not 
>> been selected.
>>
>> The problem is at line 196 & 197 which executes the browse. If I use 
>> the browse created by the wizard, no error occurs (line 196).  If I 
>> use the browse command at 197, it appears that the @bk = "c' line 
>> executes and the field not found error occurs.
>>
>> If I use the debugger, the browse appears and line 200 shows as false 
>> as @bk is empty.
>>
>> If it is empty as line 200, why is line 201 executing as @bk is empty.
>>
>> More to the point, as I indicated, the programming works correctly 
>> when run from a wizard created browse?
>>
>> Anyone see why I am having this problem as other browses written 
>> similarly work properly.
>>
>>
>> Richard Kreiss
>> GCC Consulting
>>
>>
>>
>> do_brow◄ If:
>>         Then: sn=@sn;switchto "tran"
>> 190  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If: IsCard = "Y"
>>         Then: SHOW POPUP("2","-1") "\r 1,2, or X \r-Cancel, \r C 
>> \r-Change to CC, \r R \r-Run CC"
>> 191  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>> sho_brw◄ If: IsCard = "Y"
>>         Then: aa="(brw=14,6,-1 xkey=12crx show=pkeep prc=dr_tran 
>> fill=asc,top)"
>> 192  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If: IsCard ne "Y"
>>         Then: aa="(brw=14,6,-1 show=only prc=dr_tran fill=asc,top)"
>> 193  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:
>>         Then: ab="[\b6Journal     Date    TY  St  Due Paid     Date  
>> Last 4     \a-"
>> 194  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:
>>         Then: ac="*1      *7         *18*3*9        *40 *39"{""
>> 195  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:
>>         Then: debug on
>> 196  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:
>>         Then: 'lookup tran = transaction  k=16   i=E -Nxm b="(brw=14 
>> xkey=12crx show-pkeep fill=asc,top)[Header]*1 *7              "
>> 197  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:
>>         Then: lookup tran = transaction  k=16   i=E -Nxm b=(aa&ab&ac)
>> 198  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:         @bk = "1" or @bk = "2" or @bk = "x"
>>         Then:         CLEARB;CLEARS;switchto (sn);end
>> 199  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:         @bk="C" and tran(6) ne "CH" and tran(33) lt "6"
>>         Then:         ERRORBOX "Transaction Not a CH-Check";GOTO sho_brw
>> 200  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:         @bk="C" and tran(33) = "6"
>>         Then:         ERRORBOX "Transaction Already Paid";GOTO sho_brw
>> 201  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:         @bk="C" and tran(6) = "CC" and tran(33) lt "6"
>>         Then:         MSGBOX "\b2 Transaction already a credit card 
>> \a-";GOTO sho_brw
>> 202  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:         @bk="C" and tran(6) = "CC" and tran(33) = "6"
>>         Then:         MSGBOX "\b2 Transaction already a credit card 
>> and Paid \a-
>> 203  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:         @bk="C" and tran(6) = "CH" and tran(33) lt "6"
>>         Then:         rn=tran(@rn);GOTO chg_typ
>> 204  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:         @bk="C" and tran(6) ne "CC" and tran(33) = "6"
>>         Then:         ERRORBOX "Transaction Payment type Can't be 
>> changed\nAlready Paid";GOTO sho_brw
>> 205  -------   -   -   -   -   -   -   -   -   -   -   -   - -   -   
>> -   -
>>         ◄ If:         @bk="C" and tran(6) ne "CC" and tran(33) = "9"
>>         Then:         ERRORBOX "Transaction Payment type Can't be 
>> changed\n CANCELLED;GOTO show_brw
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com
>> Subscribe/Unsubscribe/Subscription Changes
>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list




More information about the Filepro-list mailing list