RAMP-TSAD02 Step 4. Add a Signal Button to the RAMP Screen
In this step you will modify the DisplayEmployee screen so that it has a button that sends a signal to the Framework.
1. In the RAMP Tools window display the details of the DisplayEmployee screen.
2. In the Function Key Enablement section enable the F17 button and make its caption Send Signal to Filter.
Next you need to add the signal code to the button script:
3. In the vHandle_BUTTONCLICK function add this Case statement for the F17 key:
case KeyF17: /* Send RAMP_SIGNAL_1 */
objGlobal.txtEmpno = GETVALUE("txtEmpno");
objGlobal.txtGivename = GETVALUE("txtGivename");
objGlobal.txtSurname = GETVALUE("txtSurname");
AVSIGNALEVENT("RAMP_SIGNAL_1","FRAMEWORK",objGlobal.txtEmpno,objGlobal.txtGivename,objGlobal.txtSurname,"RS1_Info4","RS1_Info5",111.1,122.1,133.1,144.1,155.1);
break;
Your code will look like this:
The code retrieves the value of the txtEmpno, txtGivename and txtSurname fields on the screen (you have named them in earlier tutorials) and sends a signal with this payload to the Framework.
It also sends some static text and numeric strings just to demonstrate that the AVSIGNALEVENT function can pass five strings and five numbers in its payload.
4. Commit the changes and do a partial save of the RAMP definition.
5. Save and restart the Framework.