lookup -nl problem
Laura Brody
laura at hvcomputer.com
Fri Jun 5 14:17:03 PDT 2009
Quoting Richard Kreiss <rkreiss at verizon.net>:
> Fp 5.6.06 Windows
>
> I have an application process transactions. When run, it first
> checks to see if the credit card being processed is the latest one
> on file.
>
> Card file lookup sequence is "CC"&master_code*&"9". Nine is the
> highest sequence #.
>
> Master code is nnnn-nnnnn
>
> 27 ------- - - - - - - - - - - - - - - - -
> ◄ If: 'lookup on r_type = CC 7 master_code & sequence # of 9
> Then: lv="CC"&master_code&"9"
> 29 ------- - - - - - - - - - - - - - - - -
> ◄ If:
> Then: lookup card = l_card k=lv i=F -nl
>
> The problem is that the code does not get the highest sequence #
> record put the prior on. i.e. 3 cards on file, finds card #2.
>
> I test this programming in clerk using a message box to display the
> card found. My test in clerk was hardcoded with the master_code.
> However this code found the proper record.
>
> 76 ------- - - - - - - - - - - - - - - - -
> ◄ If:
> ◄
> Then: lv="CC"&master_code&"9" ◄
> 77 ------- - - - - - - - - - - - - - - - -
> ◄ If:
> ◄
> Then: lookup card = l_card k=lv i=F -nL
> ◄
> 78 ------- - - - - - - - - - - - - - - - -
> ◄ If: NOT card
> ◄
> Then: BEEP;ERRORBOX "Credit Card Not Found";END
> ◄
> 79 ------- - - - - - - - - - - - - - - - -
> ◄ If:
> ◄
> Then: msgbox card(3){"\nCard # is \r"<card(4)<"\nSeq
> is \b2"<card(16)<"\a-"
> 80 ------- - - - - - - - - - - - - - - - -
> ◄ If:
> Then: END
>
> Same code one in report and other in clerk. Anyone know a reason
> why the report version fails and the clerk works?
I would start off with double checking the type and length
of your variables lv and master_code.
> Richard Kreiss
>
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
--
Laura Brody
+------------- Hudson Valley Computer Associates, Inc ----------+
| PO Box 859; 120 Sixth Street http://www.hvcomputer.com |
| Verplanck, NY 10596-0859 Voice mail: (914) 739-5004 |
+------ PC repair locally, filePro programming globally --------+
More information about the Filepro-list
mailing list