Processing to run against each highlighted line of a browse lookup
Jose Lerebours
fpgroups at gmail.com
Thu Apr 30 11:28:18 PDT 2020
On 4/30/20 2:09 PM, Richard Kreiss via Filepro-list wrote:
> The suggestion to use an array for the records is a good one. you could loop through the array by incrementing the array index #. Suggest you do a looup to the record using the record number. This will insure that the correct record is being updated.
>
> The other thing you could do is use drop to execute your lookup and update.
>
> Your third choice would be use drop to loop back through the browse and use Pushkey ["CDWN"] to move the highlight down one line.
>
> I think the array would be the easiest to program and insure that your processing does each element in the array.. Just make sure you dim the array to handle all possible records that will be found. I have an array set to 5000 as my client add records that fill this arry, I was told that all I would need was a maximum of 600 records to be looked up. Actually this has grown over time (15 years). I expanded it to 5000 as I don’t think I will need to expand the array again.
>
If I were to rewrite the code today, I may attempt to use same
techniques I use in SQL, start & end at a point within the index -
Perhaps, if OP uses the fpSQL, this may be much easier to do. That
said, given that CPUs and SDs are so much faster these days, one may be
able to loop through results and load only the range of records you need
... In other words, 1 through 10, 11 through 20, 21 through 30 .....
1201 through 1220 and so on and so forth.
If this is possible, the array would not need to be more than whatever
you opt to show on screen - in other words, a truly dynamic paging system.
More information about the Filepro-list
mailing list