Event Triggers using Input Through

Tony Winter

New Member
I am trying to have an event cause a trigger upon moving from one field to the next when input is directed using the input through command.

Any suggestions or alternatives would be greatly appreciated to resolve this matter.

DETAILS: When the following is used with the input through command the leave event does not trigger for V8 progress.

define variable myData as character no-undo.

define frame a
myData.

on leave of myData
do:
....
end.

input through <device>.
update myData with frame a.
input close.
 
The trigger is a UI (User Interface) event and as you have re-directed the input stream away from the UI, then the event will not work. So you can't do what you want.

Can't you simply add your code after the input is closed?
 

Tony Winter

New Member
Thanks for the reply Mike.

I understand that it is a UI event, however I need to run a piece of code every time I move from one field to the next or at the worst from one frame to the next.
 
Switching frames shouldn't be a problem, you would use a different update statement for each frame. But I suspect that you're going to need to dispense with frames enirely and read the input manually, field by field, record by record.

If the 'myData' field was a database variable, then potentially you can get an ASSIGN trigger to fire. That might work. Alternatively, each field in the frame could have a VALIDATE clause. That should work too.

Frankly, I'd just use IMPORT. It's much safer and faster anyway, and it will allow you to control and validate the input in any way.

Sound like you have a character based procedure, and you want to run the same procedure interactively, as well as in batch mode. I used to do this at version 6, but the 4GL code was procedural then, not event-driven so it all worked great.
 
Top