RAMP-WINAD03 Step 1.  Understand What Makes the Prompter Appear

As you learnt in RAMP-WIN010: Using Special Field Handlers, automated prompting is set up in a table associated with a RAMP-TS session.

1.   Open RAMP Tools and click on the Session node in the Screen and Script List on the left. 

2.   Locate the Special Field Handling table in the session details. You have defined in the table that if a field named utxtDepartment is on any 5250 screen, and the user sets the focus to it and presses F2, the special field handler DF_PRM04 is invoked.


DF_PRM04 is a shipped Visual LANSA component. It is present, with source code, in your VL environment.    

In this case the function key you have chosen,  F2, is not allowed by the 5250 screen. However, when the user presses the key, the request is intercepted and handled entirely on the client PC.

Even if you use a key/button that is allowed by the 5250 screen, and you associate a special handler for the field with this key, the request will be intercepted and handled on the client PC. To understand why this is so:

3.   Open the script associated with the DisplayEmployee screen.

4.   Locate the vHandle_BUTTONCLICK function:



The HANDLE_PROMPT() function call invokes a RAMP supplied function.

Using the name of the focus field on the 5250 screen and the function key used, it works out whether it should call a special field handler:

In most cases the prompt request will be sent on to the 5250 screen for handling by the server because there will be no special field handler.     

5.   To test this out, disable the F2 key and enable the F4 key in the DisplayEmployee screen.


6.   Save your changes and execute the Framework as a VLF-WIN application, as Designer.

7.   Locate the Employees business object in the Personnel application and display the details of an employee.

8.   Press F4 on the Department Code field. Notice that the standard 5250 prompter is displayed.


9.   Close the Framework Designer window and in RAMP Tools change the special field handling for the utxtDepartment field to use F4.

10.   Save the RAMP definition and execute the Framework as a VLF-WIN application, as Designer.

11.   Display the details of an employee in the Personnel application, move cursor to the Department Code field and press F4. Now the special field handler is displayed instead of the standard 5250 prompter.