odd lookup problem
Richard Kreiss
rkreiss at gccconsulting.net
Mon Nov 8 12:03:27 PST 2010
> -----Original Message-----
> From: Kenneth Brody [mailto:kenbrody at spamcop.net]
> Sent: Monday, November 08, 2010 2:52 PM
> To: rkreiss at gccconsulting.net
> Cc: Filepro-list at lists.celestial.com
> Subject: Re: odd lookup problem
>
> On 11/8/2010 2:46 PM, Richard Kreiss wrote:
> [...]
> >>> What I am asking is, why should it be necessary to have a not sales
> >>> before
> >> the if sales when doing a lookup to the next lowest match?
> >>
> >> You haven't shown any code where the only change was the addition of
> "if:
> >> not sales", so there's no way to answer that.
> >
> > Original code:
> >
> > 192 ------- - - - - - - - - - - - - - - - -
> > ◄ If:
> > Then: lookup SALES = sales_journal k=16 i=C -nx
> > 193 ------- - - - - - - - - - - - - - - - -
> > ◄ If: SALES This shows true in debugger
> > Then: GOTO next_w
> > 194 ------- - - - - - - - - - - - - - - - -
> > ◄ If:
> > Then: zv="This person is not a member yet\nDo you want to continue
> entering Sale?"
> > 195 ------- - - - - - - - - - - - - - - - -
> > n_sale◄ If:
> > Then: input popup("18","-1") y ""{zv
> >
> > Modified code which didn't work:
> >
> > 192 ------- - - - - - - - - - - - - - - - -
> > ◄ If: ◄
> > Then: lv=master_code&"99" ◄
> > 193 ------- - - - - - - - - - - - - - - - -
> > ◄ If: ◄
> > Then: lookup SALES = sales_journal k=lv i=C -nL ◄
> > 194 ------- - - - - - - - - - - - - - - - -
> > ◄ If: SALES ◄ This line shows false in
> debugger
> > Then: GOTO next_w ◄
> > 195 ------- - - - - - - - - - - - - - - - -
> > ◄ If: ◄
> > Then: zv="This person is not a member yet\nDo you want to continue
> entering sales?"
> >
> > Here are copies of the code you requested. Line 193 in the original code
> will show as true when the debugger is on if any sales journal record is
> present. It will drop through to the sales question if no sales journal record is
> present.
>
> But you've changed the lookup key. I said:
>
> >> You haven't shown any code where the only change was the addition of
> "if:
> >> not sales", so there's no way to answer that.
>
> Show code where the only change is the addition of "if: not sales".
>
> And what is the exact value of the lookup key, and the value of the field(s) in
> the lookup file on the record you would expect to find.
>
> [...]
>
> --
> Kenneth Brody
Master code=1003-13412
Renewal = 04
Sales journal
Master code=1003-13412
Renewal = 04
Journal #: 26509
There are 3 other records matching the master code. Renewal field blank, 01,02 & 03
The next lowest record not matching the master_code is 1003-13249
Ken, the working version of the code does find the correct sales journal record.
Richard
More information about the Filepro-list
mailing list