Some Sort of Control From The Browse Screen

Bruce Easton bruce at stn.com
Sun Oct 17 21:33:46 PDT 2010


  Scott - glad to see you have something working.  Following this struck my
curiosity, so I tried a few things and came up with the following code
which I tested under 5.014.  I realized part way through that I really
did need the 5.6 'dokey' command to make it do all that I wanted it to do.

For my example, I wanted to distinguish between U pressed from the browse
and U pressed from @entsel.  (I gather that you've already addressed this
yourself.)  I also wanted to have the special field that triggers the 
flag field
update to be hidden away on an alternate screen.  Here's the code I
came up with:

    1 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
top      If: 'any other normal save prc  would go up here
        Then: end
    2 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If: 'dummy fld on screen 'brw' for triggering marking
        Then: aa(1,*)
    3 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If:
        Then: declare did_at_entsel(1,*,g)
    4 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If:
        Then: declare going_to_brw(1,*,g)
    5 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If:
        Then: declare flagging_it(1,*,g)
    6 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
@update  If: @cd eq ""  'add-record mode - normal screen action
        Then: did_at_entsel=""; screen; goto top
    7 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If: did_at_entsel eq "Y"  'normal scrn action if rec not
        Then: screen; goto top      'accessed directly from browse
    8 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If:                       'update an alternate screen w/
        Then: screen "brw"; goto top 'dummy trigger field on it
    9 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
@entsel  If: flagging_it eq "Y" 'finish up flagging & back to brw
        Then: did_at_entsel=""; flagging_it=""; pushkey "BR"; end
   10 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If: going_to_brw ne "Y"     'we're staying @entsel
        Then: did_at_entsel="Y"; end  'for normal record processng
   11 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If:                         'reset fields from @keyT**
        Then: did_at_entsel=""; going_to_brw=""; end
   12 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
@keyT    If: 'simulate 5.6 dokey by having user hit T key from
        Then: '@entsel (see commented code below for 5.6 code)
   13 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If: 'go back to browse, but first clear some flag fields
        Then: did_at_entsel=""; going_to_brw="Y"; pushkey "B"; end
   14 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
@wefaa   If: 'when entering this fld on alt screen perform
        Then: 'desired fld update, save & finish in @entsel case.
   15 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If:    'in my example- I'm flagging a time field w/current tm
        Then: 3=@tm; flagging_it="Y"; escape; end
   16 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If: '(below is inactive, untested 5.6 code to replace
        Then: '@keyT code above)
   17 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If: '@keyB
        Then: '    did_at_entsel=""; going_to_brw="Y"; dokey "B"; end
   18 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -
          If: '@keyX
        Then: '    did_at_entsel=""; going_to_brw="Y"; dokey "X"; end

This seems to work OK, but does require that the operator
hit the "T" key from @entsel on a record rather than the "B"
key to go back to the browse.  Without the dokey command,
I don't know of any other way to reset my flag fields to
where they should be when at a browse.  I think this
would work fine under 5.6.   (But hey - if it were me, i'd
go at this with a processing browse.)

This uses a normal screen and an alternate screen named 'brw'
that only has dummy field aa on it (updatable) to be the trigger
field for special processing.  So one never really sees this alt.
screen - I didn't even see a flash of it when I was testing.

One thing that surprised me with this that I had never tried, was
pushing "BR" in one case when going back to the browse.  I guess
it makes perfect sense, but I didn't think filepro would be listening
past the "B" key.  so the effect here, since my field update did
change the index, is that the browse list is also reset (with the "R"
part of "BR") as it comes back to the browse.  This helped some
with the browse jumping around after an update as John warned
about.

Bruce


Bruce Easton
STN, Inc.








On 10/17/10 9:45 PM, Scott Walker wrote:

 > It works!

[..]

 >> I want to be highlighting a record and press a key (lets say
 >> "T") and have

>>  it check off the highlighted record (as in checking off the
>>  items in your
>>  check book that have cleared).  So programmatically when you
>>  pressed "T" on
>>  the browse screen, the highlighted record would have the




More information about the Filepro-list mailing list