Processing to run against each highlighted line of a browse lookup
Bruce Easton
bruce at stn.com
Thu Apr 30 10:43:09 PDT 2020
On 4/30/20 12:40 PM, Jose Lerebours via Filepro-list wrote:
> On 4/30/20 12:27 PM, James Flanagan via Filepro-list wrote:
>> Freebsd 10.3
>> Filepro 5.7.00.09D4
>>
>> I am looking for solution where I can get some processing to run for
>> each highlighted line of a browse lookup, ideally without hitting
>> another keystroke.
>>
>> Of course, using @SK eq “ENTR”, I can accomplish what I want to do,
>> BUT that requires me to use the arrow key up or down, and then hit
>> enter for each record to run processing on.
>>
>> What I would like is if the browse lookup would recognize the @SK’s
>> CRUP and CDWN keys (it appears that it does not do so despite not
>> giving any syntax error), and then run processing on the highlighted
>> record for each highlighted bar movement.
>>
>> Is there a method for moving the highlight in a browse lookup AND
>> running some processing in a single keystroke? Thank you very much,
>> in advance...
>>
> some 20+ years ago I ran into the same issue and my solution was to
> write the code where:
>
> 1. Load records onto array(s)
> 2. Use show command in loop processing to display rows
> 3. Use waitkey to capture key stroke
>
> @sk will hold the value and by using this method, I was able to create
> custom browse processes where, at times, one row include the
> equivalent of 3 rows worth of data.
>
> Additionally, I was able to give user options to move right/left,
> up/down, top/bottom and gave me countless options to control data
> content and flow.
>
> To do this, you will need a good understanding of use of arrays ...
> and once you write the code, you may never use standard browse
> processing.
I used a technique similar to what Jose has described (also years ago).
I also have made use of a standard browse lookup with its "Exit Keys"
being either 8/6/2/4 for use on a number pad or some other combination
of keys that would allow the operator to simulate the use of the
up/down/left/right "arrow" keys. For this latter technique, I included
a visual representation of the pseudo-arrow key usage at the bottom of
the screen - usually overriding lines 22-24.
More information about the Filepro-list
mailing list