Navigation: CodeStencil > Global Schema > Foreign Key Lookups |
Assigning Foreign Key lookups to tables in your schema helps to introduce some sophistication to the way your data is displayed especially if you are displaying a grid. Most stencils will use this assigned lookup to help you create the proper representation of the column displayed from your foreign key table.
The fact the we specified the LastName as the Display Colum, that is why the Invoice Table was able to display that text instead of the foreign key Id.
There are 4 ways you can specify the Foreign Key lookups in tables:
1.While ADDing a Column - Once you pick a Foreign Key table, the Lookup tab becomes enabled
2.While CHANGing/Updating a Column - If the column being updated is a foreign key column, then the Lookup tab automatically becomes enabled for data selection.
3.From the Advanced Configuration feature - If the column highlighted is a foreign key column then the Lookup tab becomes enabled.
4.From the Actions | Assign Foreign Key Lookups button in the Global Schema - This is by far the quickest to assign foreign key lookups to multiple tables while on a single user interface.
Steps:
(1)Select Actions | Assign Foreign Key Lookups
(2)Select a Table, e.g. Invoice. Note the "Columns" grid is pre-populated with the available foreign keys. All you now have to do is to assign (from the foreign key table) which column to display.
(3)Highlight the foreign key column (under the "Columns" grid on the right), Click on the ASSIGN button. This prompts you with a form that allows you to pick the column ( from the foreign key table) you want to use.
(4)Click OK and CLOSE