Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Finally, think about adding, re-labeling or changing buttons and function keys so as to get a more Windows like "Previous" -> "Next" -> "Save" flow going on between screens A, B and C. Possibly something like this:


Has a "Next" Button

Has a "Previous" Button

Screen A

Yes - probably re-labels existing Enter/OK button. Script sends KeyEnter to advance to screen B  B.

No. 

Screen B

Yes - probably re-labels existing Enter/OK button. Script sends KeyEnter to advance to screen C  C.

Yes - probably re-labels something like F12 to cause Screen A to be redisplayed (the 5250 application would need to support this of course)   .

Screen C

No - Existing Enter/OK button is probably re-labeled as ""Save" instead. Script probably sends KeyEnter to advance to screen A to start a brand new order (after saving the current one).   

Yes - probably re-labels something like F12 to cause Screen B to be redisplayed (the 5250 application would need to support this of course)   

...

.

If a pop-up message is displayed when leaving Screen A B or C

Sometimes a 5250 pop-up message is displayed when leaving Screen A, B or C (either by pressing F12 on IBM i or by selecting another object in the Framework) asking to confirm the changes, and the response to the message takes the user to different screens. For example if the answer is Yes the user might be taken to the nearest junction, but if the answer is No the user might be taken back to the entry screen (A B or C).

The easiest solution to this is to ignore the popup by defining it in newlook as a full display (see How to Turn Pop-Ups into Full Screens) and defining it to RAMP as a special screen.   The script for the special screen can set the value of the Response field to Yes and send the Enter key.  In this way, the assumption is that the user is cancelling the entry when they select something else in the Framework. 

In addition a Cancel button on each of the entry screens can be set to send an F12 key to get to the special screen and back to the junction, and the pop-up can be hidden.  Alternatively Alternatively the Cancel button script for the F12 key could contain a javascript confirm() function, which will display a confirmation box to the user: 
       var answer =

      var answer = confirm("Confirm cancellation of changes?")

...

     if (answer == true)

...

     {

...

        /* user pressed the ok button on the confirmation box to cancel, so send the F12 key */

...

        SENDKEY(KeyF12);

...

        /* if popup is defined as a special, let the special eliminate the screen */

...

        HIDE_CURRENT_FORM("Entry successfully cancelled.");

...

     }

...

     else

...

     {

...

        /* user pressed the cancel button on the confirmation box, so don't do anything */

...

     }

...