RAMP TS008 Step 1 Make Display Employee Screen Input Capable

RAMP-TS

RAMP-TS008 Step 1. Make Display Employee Screen Input Capable

In this step you will display the DisplayEmployee screen in update mode.

The tutorial RAMP-TS006: Snapping in a Basic Inquiry Screen showed how to snap in a basic read-only inquiry screen to the Framework just to demonstrate some basic steps, but in real-life modernized applications you would as a rule display the screens as input capable.

In RAMP-TS004 Step 1. Name the Screens you named the txtSurname field on the DisplayEmployee screen.  The field is only displayed when the screen is in change mode so you can use it to determine and set the mode of the screen.

1.   In the RAMP Tools window select the DisplayEmployee screen in the Screen and Script List.

2.   Expand it to display the script associated with the screen.

3.   In the vHandle_ARRIVE function add this code after the definition of bReturn to see if the txtSurname field exists, and if it does not, to set the screen to change mode:

if (CHECK_FIELD_EXISTS("txtSurname"))
     {

     }

     else
     {
     SENDKEY(KeyF21);
     }

  

Your code should look like this:

 

4.   Commit the changes.

5.   Do a partial save of the RAMP definition.

6.   Display the Framework.

7.   Select an employee in the instance list. Notice that the Browse/Maintain Employee and Skill Files screen is now displayed in change mode.

8.   Make a change to the name of the employee.

9.   Press Enter.

Notice that after the save the FindEmployee screen is shown.

 

This is typical 5250 behavior which needs to be changed to fit the Framework navigation model. In the next step you will make the FindEmployee script to redisplay the Browse/Maintain Employee and Skill Files screen after employee details have been saved.