Browse lookup field not found error
Richard Kreiss
rkreiss at gccconsulting.net
Mon Jan 19 09:47:25 PST 2015
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
More information about the Filepro-list
mailing list