Step 3 Creating a WAM By Location Filter

Visual LANSA Framework

Step 3. Creating a WAM By Location Filter

In this step, you will create a real By Location filter that will locate Employees by the department and section in which they work.

1.  Start the Program Coding Assistant.

2.   Select the Framework object navigation tree in the upper left of the Program Coding Assistant form.

3.   Drill down through the tree to find your By Location filter and select it.

4.   Choose Web - using WAM components option as the platform.

5.   Select the type Filter that searches using a file or view.

6.   Click Next.

 The Program Coding Assistant shows the PSLMST file as the physical file and detects the Visual and Programmatic Identifiers required. You do not need to change any of these values.

 

7.   Click the Next button. On the screen:

  • Select the file view named PSLMST1 (Personnel by Department, Section, Employee Number).
  • Select the search keys DEPTMENT and SECTION.
  • Uncheck User must specify all Chosen Keys.
  • Uncheck Allow Generic Searching.
  • Check Remember key values between filter executions.

8.   Click the Generate Code button. The right hand side of the Program Coding Assistant now shows the code that it has generated for your filter.

9.   In the Generated Code window specify iiiCOM05 (where iii are your initials) as the name of your filter and give it a description. If you are using an unlicensed or trial version of Visual LANSA, you must always use the 3 characters DEM to replace iii. Then click the Create button to create your filter.

     (Alternatively you can copy the generated code to the clipboard by clicking the "Copy Code to Clipboard" button and paste into an existing WAM if you have created one.)

10.  Your filter is displayed in the Visual LANSA editor. Compile it and choose to generate XSL for all web routines.

11.  Check in the WAM and its associated layout weblet to the server.