Lookup "gotcha"

Richard Kreiss rkreiss at gccconsulting.net
Fri Oct 23 14:58:06 PDT 2009


I have a routine that from a browse needs to do another browse, into a
second file, without closing the original browse.

I solved this problem by loading the records needed into an array and then
using listbox to display the results.  This works fine.

This program is used at the gatehouse for our community.  When a guest
arrives, the guard highlights the name and presses <V> to list those guests
who can pass without the resident being called. 

One resident called me when her daughter arrived as the guard had called and
told her she had no names on this list.  When I checked the file, she had 9
names.  However, when I ran the guards program, and highlighted her name,
sure enough nothing came up.

The problem is when looping through the file, with the key being
street&address, her records are at the end of the file.  The program loaded
the array but when it hit the NOT CLIST, the routing ended without
displaying the array.

To get around this problem I now precount the number of records and then do
the lookup to load the array.  When the array counter = list_number the
program branches to display the array.


Richard Kreiss
GCC Consulting
rkreiss at gccconsulting.net
  







More information about the Filepro-list mailing list