You can try out the OnLayoutKeystroke to trigger a script. Then either use a loop, or the "Scroll Window" script step to position.
Something like this would work:
Set Variable $letter = Get(TriggerKeystroke)
Go To Record [next]
Exit Loop if [ left (field ; 1 ) = $letter OR get(recordnumber) = get(foundcount)]
A more common practice in FM is mapping the up and down arrows to page up and down (also, home, end, etc..)
I believe you will have to make a record active to check the first letter you are looking to correspond to (as noted in the loop above), although you can script around this creatively if you need.
1 of 1 people found this helpful
The equivalent of the "KeyPress" event to which you refer is the OnLayoutKeystroke Script Trigger. It's found in the Layout Setup dialog, under Script Triggers:
Of course, you'll need to write a script to invoke on that event. That script will need to do the work of scrolling the layout. I'm not entirely sure what you mean by "first record of that letter"; presumably, you have some sort of address book list? But you should be able to write a script that will scroll to the appropriate record by comparing the keystroke (using the Get ( TriggerKeystroke ) function) against the first letter of whatever field you're wanting to capture.
And no, I don't believe there's a way to avoid making it the active record. Someone else may know of a way, but the Go to Record script step inherently sets the current record to the result of the calculation, and I can't think of a way to make the Scroll Window script step work off the top of my head.
Thanks Mike, that worked just fine. Only differences I needed were to move to first record before loop, and then reverse the order of the 2 statements in the loop, because it would never stay on the first record otherwise.
Thanks for the reply Mike. Sorry I couldn't give you credit for the answer, as the other Mike got in first. I did mark it helpful, though.