Step 6. Test New PJF in Employee File

REP010 - Access Routes and PJFs

In this step, you will add the predetermined join field Department description to iiiMaintEmployVirtuals (Real and Virtual Fields in Employee File).

1.  Using the iiiLIST tab, locate and open the form iiiMaintEmployVirtuals in the editor.

a.  Display the Design tab.

b.  In the iiiLIST tab locate the iiiDeptDescPJF (Department Description) field.

c.  Drag the iiiDeptDescPJF field onto the form above the virtual fields. You may need to move the existing virtual fields lower.

     Hint: Select the four virtual fields. Position the mouse above and to the left of the virtual fields. Holding down the left mouse button, drag it to below the virtual fields and to the right.

d.  Release the mouse button and all the fields will be selected.

e.  Move the selected fields down, using the Ctrl+Cursor key.

f.  Drag and drop the field iiiDeptDescPJF onto the form above the virtual fields.

     Note: You will not need to change the source code, because the FETCH statement uses the Fields(*all) parameter. You should generally not use the Fields(*ALL) option unless all the file's fields are required in this form.

2.  Compile the form.

3.  Execute the form.

a.  Fetch the details for an employee.

b.  You will see the Department description such as Administration has been retrieved into the Department PJF field from the Department file. Once again it is the file OAM which implements this code.

4.  Close the form and close the form in the editor.