Newbie advice

Richard Kreiss rkreiss at verizon.net
Wed Aug 25 04:34:10 PDT 2021


I think that Mike was referring to field 16 not 6. He is correct in checking for a not after the lookup to see if it was successful. You could also declare a long variable and see if it contains a value after a successful lookup. If the field is empty skip line 816 as nothing will post. You could also put up a message that the field has no value. I would add the not line just after the lookup to inv as this check should be in place for any lookup. 

Also check the map for a field 16. 

Richard Kreiss
GCC CONSULTING 
Sent from my iPhone

> On Aug 24, 2021, at 4:34 PM, Mike Schwartz via Filepro-list <filepro-list at lists.celestial.com> wrote:
> 
>      Ok, the lookup for a free record in the "his=gfinvhis" file should
> never fail unless there are extraordinary circumstances, and the "his" file
> is being written to in lines 811 thru 815 without ant errors.  So it is most
> likely that there isn't a field #6 in the gfinvhis database.  If there is a
> field 6 in the gfinvhs database, then possibly the "lookup inv=" file record
> has not been successfully looked up.  
> 
>     Is there a field #6 in the gfinvhis file?    
> 
>     Can you look back in the code and find a "lookup inv=???" line?  What
> filePro database does "lookup inv=" point to?
> 
>      Just before line 816, can you insert a NEW line 816 that says:
> 
> IF:  not inv
> THEN:  msgbox "No INV record found in line 816"
> 
>     Then run the code again and let us know if the "No INV record found in
> line 816" error message pops up?
> 
> Thanks!
> 
> Mike Schwartz
> 
> -----Original Message-----
> From: Jeff Bandle <jeffbandle at gmail.com> 
> Sent: Tuesday, August 24, 2021 2:24 PM
> To: mschw at athenet.net
> Cc: Filepro-list at lists.celestial.com
> Subject: RE: Newbie advice
> 
> Ok.  The following is the code that I think is the culprit as it is handling
> the reversal of an invoice and that is where it blew up.  It is in a piece
> of code called REVERSIT.PRC that is called from GFSALES/KEYR.prc code. That
> code handles the user entering R while looking at an invoice to
> reverse/refund the amount.     The code with line numbers is as follows:
> 
> 809 INVHIST:'inventory history for items that are not sets::
> 810 ::lookup his = gfinvhis  r=free  -e:
> 811 :                                'item code:his(1)=xx:



More information about the Filepro-list mailing list