Page History
Even though you can create most filters simply by using the Program Coding Assistant, you should understand how they are coded.
1. Switch to the Visual LANSA editor where the iiiRMP01 reusable part is open. Switch to the Source tab.
2. Review the generated source code in the Source tab to see how the filter is coded to add data to the instance list:
The Framework is notified that an update is about to occur.
#avListManager.BeginListUpdate
Next, the list is cleared of any existing items.
#avListManager.ClearList
Next, data is selected. You can use one the techniques you learnt in the Visual LANSA Fundamentals tutorials to do this. For example:
Select Fields(#XG_Ident) From_File(PSLMST2) With_key(#XG_Keys) Generic(*yes) Nbr_Keys(*Compute)
Next, the visual identifiers are set up:
#UF_VISID1u := #EMPNO#UF_VISID2u := #SURNAME
Then the data is added to the list.
#avListManager.AddtoList VisualId1(#UF_VISID1u) VisualId2(#UF_VISID2u) AKey1(#EMPNO) AColumn1(#GIVENAME) AColumn2(#ADDRESS1) AColumn3(#ADDRESS2) AColumn4(#ADDRESS3) NColumn1(#POSTCODE) AColumn5(#PHONEHME) AColumn6(#PHONEBUS) NColumn2(#STARTDTER) NColumn3(#TERMDATER) AColumn7(#DEPTMENT) AColumn8(#SECTION) NColumn4(#SALARY) NColumn5(#STARTDTE) NColumn6(#TERMDATE) NColumn7(#MNTHSAL)
VisualId1 will be shown in column one of the instance list and VisualId2 will be shown in column two of the instance list. Akey1 is the key that uniquely identifies an employee (in this case the field is alphanumeric, so its Akey1, not Nkey1).
Finally, the Framework is notified that the instance list update is complete.
#avListManager.EndListUpdate
3. Next click on Details tab in the editor to display the properties of your component.
...
8. Close the iiiRMP01 component.
You might want to read Filter and Command Handler Anatomy in the Framework guide to see how these components are structured.

