Step 2 Change the Filter

VLF Windows Application Development

Step 2. Change the Filter

VFW044 – Add Instance List Columns

You need to make some simple changes to your filter to populate the new instance list columns.

1.  Open the reusable part iiiVFW04 in the Visual LANSA editor. Note that you will find it on your Favorites / Last Opened tab.

2.  Change the Group_by XG_IDENT to include fields DEPTMENT, SALARY and STARTDTE. Your code should now look like the following – changes are shown in red.:

Group_By Name(#XG_Ident) Fields(#EMPNO #SURNAME #GIVENAME #deptment #salary #startdte)

 

3.  In the uSelectData method routine, within the SELECT/ENDSELECT loop, set up field VF_ELDTS to contain STARTDTE, converted to an ISO date and then converted to a display string.

     The field VF_ELDTS is an alphanumeric field of length 19, which exists in the repository and is used by Framework components.

     Your code should use intrinsic functions. For example:

#vf_eldts := #startdte.asdate( DDMMYY ).asDisplayString( ISO )

 

     Use this code if your date format requires  it:

#vf_eldts := #startdte.asdate( MMDDYY ).asDisplayString( ISO )

 

4.  Change the invoke AddtoList method in the List Manager to populate the additional columns. For example:

Invoke Method(#avListManager.AddtoList) Visualid1(#UF_VisID1) Visualid2(#UF_VisID2) Akey1(#EMPNO) Acolumn1(#deptment) Ncolumn1(#salary) Dcolumn1(#vf_eldts)

 

5.  Compile your filter.

6.  Start the Framework and test the result.