odd lookup problem

Kenneth Brody kenbrody at spamcop.net
Mon Nov 8 11:51:56 PST 2010


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


More information about the Filepro-list mailing list