In this step, you will create a real filter which searches the PSLMST table by employee surname. You will also learn how to use the Program Coding Assistant.
1. In the Framework Windows Designer window, select Employees and click on the Program Coding Assistant button in the By Name filter.
The Program Coding Assistant window is displayed. It allows you to create different types of components that can be plugged into your filters, instance lists and command handlers. It is highly recommended to use the program coding assistant when you first start using the Framework.
Initially you will most likely use filters that generate a component that can be executed (e.g. CRUD Filter (Create/Read/Update/Delete), Filter that searches a file or view). As you progress you might only use a skeleton filter or simply copy from one that is similar to one that you want to create.
2. If you are using a non-English system, click on Framework -> Your Framework in the top-left tree view. The Set LANSA code generation preferences option appears at the bottom. Select this option and set your preferences.
3. In the list on the top left, ensure the Personnel application, Employees and the By Name filter are selected.
4. As the type of code you want to generate, select Filter and Instance List.
5. Click the Next button.
6. On the next page specify PSLMST as The physical file that most closely resembles this business object.
8. Drag all the fields in the table to the list of fields to be displayed.
9. Make EMPNO the programmatic identifier for the filter.
10. Click the Next button.
11. On the next page specify PSLMST2 as the view to be used for filtering/searching operations. It is index of the PSLMST table keyed by the SURNAME and GIVENAME fields.
Note that you need an appropriate index for each filter that you want to create. Before implementing all your filters, review your data model to confirm that all the logical files exist. Doing so will speed up the process of implementing your prototype.
12. Select the SURNAME field as the key of the view to be used for search operations.
13. Click the Next button.
14. Select the option Routine to listen for signals to update the instance list.
15. Click the Generate Code button.
The next page, Generated Code, displays the source code for your filter. You now need to create the component that will contain this code:
16. Specify iiiRMP01 (iii are your initials) as the name of your real filter and By Name Filter as the description..
17. Click on the Create button to create the component.
After a brief delay the filter component is displayed in the Visual LANSA editor.
18. Compile the component in the editor.






