RAMP-TS007 Step 4. Change the Script to Update the Instance List
In this step you will add code to your screen script to update the instance list when a new employee is created.
1. Add this statement after the MESSAGE function in the error handling code to send a signal to your filter to update the instance list after an employee has been successfully created:
AVSIGNALEVENT("Add_List_Entry","BUSINESSOBJECT", oPayload.empno)
Your code will look like this:
When you created your filter in RAMP-TS003 Step 1. Creating Your Real By Name Filter, you specified that the filter should contain code to listen for signals to update the instance list, so the code to listen for this signal already exists in the filter.
2. Save the code changes by clicking on the Commit Changes button.
3. Do a partial save of the RAMP definition.
4. Display the Framework.
5. Use the filter to locate all employees whose surname starts with S.
6. Enter the details for a new employee whose name starts with S.
7. Click Enter. Notice that the newly created employee is displayed in the instance list.