***SPAM*** Re: Filepro-list Digest, Vol 82, Issue 11

Richard Kreiss rkreiss at gccconsulting.net
Tue Nov 9 10:48:42 PST 2010



> -----Original Message-----
> From: Boaz Bezborodko [mailto:boaz at mirrotek.com]
> Sent: Monday, November 08, 2010 5:36 PM
> To: filepro-list at lists.celestial.com
> Cc: Richard Kreiss
> Subject: ***SPAM*** Re: Filepro-list Digest, Vol 82, Issue 11
> 
> > Date: Mon, 8 Nov 2010 15:03:27 -0500
> > From: "Richard Kreiss"<rkreiss at gccconsulting.net>
> > Subject: RE: odd lookup problem
> > To: "'Kenneth Brody'"<kenbrody at spamcop.net>
> > Cc:Filepro-list at lists.celestial.com
> > Message-ID:<00a101cb7f80$020e3ca0$062ab5e0$@gccconsulting.net>
> > Content-Type: text/plain;	charset="UTF-8"
> >
> >
> >
> >> >  -----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
> 
> Richard,
> 
> The point that Ken and others seem to be trying to say is that 'lv' may
not be
> exactly the same as field '16'.  A difference of an extra space between
> characters is all that is necessary to screw things up, but I'm sure you
knew
> that.
> 
> I've had this kind of problem occur a couple of times and it is usually
when
> I've assumed that something is formatted correctly, but I find out later
that it
> wasn't.  Check out the exact contents of 'lv' to make sure that it exactly
> matches '16'.  'Master code' may be formatted with too many or too few
> characters and a 'master_code & "99"' may not be formatted like '16'.  Or
lv
> may have be set up for a different size variable or a different edit and
won't
> included all the characters.
> 
> Do a careful comparison (including counting all characters) of what debug
> shows in 'lv' and '16' and see if there is the slightest bit of
difference.  I know
> you probably did this already just as I have on occasion.  But I've found
that
> the error in a situation like this has always been an error on my part and
not
> fPro's.
> 
> Best of luck,
> 
> Boaz

Master code will always be NNNN-NNNNN.  It is a 10 character field with a
custom edit (10,ccp).  No blanks, no spaces.

The renewal field is a zero fill 2 digit field,  The only time this field is
blank is for the first sales journal created for an account.

Richard
 




More information about the Filepro-list mailing list