Skip to main content

"After Routine" - in screen event

  • March 7, 2012
  • 6 replies
  • 0 views

[Migrated content. Thread originally posted on 07 March 2012]

In the event page og a screen ( in screen designer, AcuBench), there is two linjes;
Before Routine
After Routine

How is this used, and when are they triggered?

I have tried to add a reference to a paragraph here, but it is never hit.

Regards Dagl

6 replies

Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • March 7, 2012

[Migrated content. Thread originally posted on 07 March 2012]

In the event page og a screen ( in screen designer, AcuBench), there is two linjes;
Before Routine
After Routine

How is this used, and when are they triggered?

I have tried to add a reference to a paragraph here, but it is never hit.

Regards Dagl
In the screen designer, properties window, go to the right edge of the "Before Routine", you'll get a dialog, enter the dialog, and then enter your paragraph name, in my case I used xxxx. Now generate the program. In the "Program-name.prd" copyfile you'll see something like this:

Acu-Screen1-Routine.
PERFORM xxxx
PERFORM Acu-Screen1-Scrn
PERFORM Acu-Screen1-Proc

  • 0 replies
  • March 8, 2012

[Migrated content. Thread originally posted on 07 March 2012]

In the event page og a screen ( in screen designer, AcuBench), there is two linjes;
Before Routine
After Routine

How is this used, and when are they triggered?

I have tried to add a reference to a paragraph here, but it is never hit.

Regards Dagl
Actually, I dont get this to work. Your result does not show up in my .prd file.
But nevertheless, we are not using this file in our code, so I guess this option is not possible for me

All I want to achieve, is to trigger an event when the the user leaves the last entry-field in a screen.
This I should use to validate the information, and mayby store det changed data.

New ideas for achieving this is welcome.

Regards Dagl

Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • March 8, 2012

[Migrated content. Thread originally posted on 07 March 2012]

In the event page og a screen ( in screen designer, AcuBench), there is two linjes;
Before Routine
After Routine

How is this used, and when are they triggered?

I have tried to add a reference to a paragraph here, but it is never hit.

Regards Dagl
Are you using the AcuBench generated code? .. We'll go with your example .. last entry-field .. in the property window, event tab, choose the after procedure, if you type in a paragraph, then you will be making an entry in the *.prd or *.evt file, so that means you'll rely on AcuBench generated code. What if the user never visits the last entry field, then your code will not get executed. Try opening the example AcuBench workspace, File, Open Workspace, navigate to C:\\Program Files\\Micro Focus\\Acucbl911\\AcuGT\\sample\\acubench and select samples.pjt. In the Structural View ( bottom left tab), choose and expand the GUI samples project, select the Push-Btn program, select the screen, and them high light the push button with the OK bitmap. Look at the properties window, event tab. You'll see that the OK button has a "link to" paragraph, this allows that whenever the button is selected, this paragraph will be executed.

  • 0 replies
  • March 13, 2012

[Migrated content. Thread originally posted on 07 March 2012]

In the event page og a screen ( in screen designer, AcuBench), there is two linjes;
Before Routine
After Routine

How is this used, and when are they triggered?

I have tried to add a reference to a paragraph here, but it is never hit.

Regards Dagl
We partly use AcuBench generated code. But only the file *.scr.
When we add - for instance - a event procedure - I insert the paragraph name in the event page of properties for the field. Then, I write the paragraph in the .cbl - file.
Besides screen section, we have all our code in one file - the .cbl file.

I know that the user might not visit the last field. But trapping if the user has changed fields, and terminates without visiting the last field, is done and is working. I can also trap when the user leaves the last field. But if I then add a new field, which will be the last one, I must remember to move the code from the old field to the new one. I was hoping for a more dynamic version if the screen itself would notify when the "accept" was moving from the last field in tab order to the first.

Regards Dagl

Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • March 13, 2012

[Migrated content. Thread originally posted on 07 March 2012]

In the event page og a screen ( in screen designer, AcuBench), there is two linjes;
Before Routine
After Routine

How is this used, and when are they triggered?

I have tried to add a reference to a paragraph here, but it is never hit.

Regards Dagl
It seems that you are on the right track .. you have code that monitors when someone changes focus ... in addition to monitoring the controls, your accept screen ...
accept screen-1
on exception perform exception-process
not on exception perform see-if -all-fields-were-completed

Again, the see-if -all-fields-were-completed would need to be edited any time new controls were added.

I hope this helps.

  • 0 replies
  • March 20, 2012

[Migrated content. Thread originally posted on 07 March 2012]

In the event page og a screen ( in screen designer, AcuBench), there is two linjes;
Before Routine
After Routine

How is this used, and when are they triggered?

I have tried to add a reference to a paragraph here, but it is never hit.

Regards Dagl
Thanks, I will consider this solution.

Regards Dagl