Ensure that you have completed How to Define an Access Route. You need a suitable access route in order to define a PJC.
See Predetermined Join Column Concepts.
1. Begin this step with table MyEmployee open in the editor and with the Access Routes tab selected. You will define a PJC which looks up Department Description from table MyDepartments.
2. On the Repository tab, locate table xDepartments and expand its definition. Select column xDepartmentDescription and use the context menu to Copy it to create field MyEmployeeDepartment.
Do not copy rule and triggers, visualization and help text. Do not open in the editor.
3. With the Access Routes tab selected for table MyEmployee, select Add PJC from the Add menu on the Home ribbon:
3. The Access Routes tab will show a <New> PJC and the Details tab will open to define the PJC.
4. The Details tab, defining the PJC, will be showing PJC Type = Lookup because the Access Route defines a one-to-one relationship.
a. Enter MyEmployeeDepartment as PJC Column. This is the column in table MyEmployee which will be populated by a lookup to MyDepartments
b. Enter xDepartmentDescription as Source Column. This is the column to be looked up in table MyDepartments.
Note: In both cases, you could have used the ellipsis button to find the required column name.
5. Save the table definition.
6. Compile the table, ensuring the Compile Option is Rebuild OAMs:
You could now create an application which accesses the table MyEmployee and requests column MyEmployeeDepartment. The OAM will look up Department Description in table MyDepartments, and return the value into MyEmployeeDepartment.