Step 3. Modify iiixEmployeeDataServer Server Module

In this step, you will extend the FindAll srvroutine in the iiixEmployeeDataServer Server Module to:

1.  Open the iiixEmployeeDataServer Server Module in the editor.

     Add the fields xEmployeeImageThumbnail and xDepartmentDescription to the end of the working list xEmployeeList.

2.  Locate the FindAll  srvroutine (Hint: see Go To tab). Add code to perform the following:

Add code to fetch field xEmployeeImageThumbnail from table xEmployeeImages with the key xEmployeeIdentification for each employee before an entry is added to list xEmployeeList.

Add code to fetch field xDepartmentdescription from the table xDepartments with the key xDepartmentCode.

     Your code should look like the following, changes are shown in red.

Srvroutine Name(FindAll)

List_Map For(*Output) List(#xEmployeeList)


Select Fields(#xEmployeeList) From_File(xEmployee)

Fetch Fields(#xEmployeeImageThumbnail) From_File(xEmployeeImages) With_Key(#xEmployeeIdentification)

Fetch Fields(#xDepartmentDescription) From_File(xdepartments) With_Key(#xDepartmentCode)

Add_Entry To_List(#xEmployeeList)





3.  Compile your Server Module.