Table Link Maintenance - Fields

 

Table Link Maintenance

Expand/Collapse all Show/Hide All

Primary Table Name

Enter the Primary table name, or click the Lookup button to list the available table names. Any table that links to other tables can be a Primary table. Links to other tables are key expressions formed with the column names from the Primary table, where the key expression evaluates to the key needed to read a record in the Link table.

 

Key Expression

Enter one or more column names concatenated with a plus sign (+) between each column name or constant. The expression must, when evaluated, be the key to the linked table. Constants in quotes can also be entered. The column names must all come from the Primary table.

Expand/Collapse item Example 1 - Key Expression

Primary Table Name = GL_Account (.M4T)

Link Table Name = GL_AccountCategory (.M4T)

Primary Key Expression = AccountCategory

AccountCategory$ is a field in every record of GL_Account.M4T, which is also the key to the GL_AccountCategory.M4T table.

 

Expand/Collapse item Example 2 - Key Expression

Primary Table Name = SO_SalesOrderDetail (.M4T)

Link Table Name = SO_SalesOrderHeader (.M4T)

Primary Key Expression = SO_SalesOrderNo+EntryNo

SO_SalesOrderNo$ and and EntryNo$ are fields in every record of SO_SalesOrderDetail.M4T, which, when properly concatenated, form the key to a linked record in SO_SalesOrderHeader.M4T.

Note A reverse link from SO_SalesOrderHeader.M4T to SO_SalesOrderDetail.M4T cannot be formed, because the LineKey column name needed to complete the key to the Detail table is not a column name in the Header table.

 

Expand/Collapse item Example 3 - Key Expression

Primary Table Name = GL_Account (.M4T)

Link Table Name = GL_MainAccount (.M4T)

Primary Key Expression = "01"+MainAccountCode

MainAccountCode$ is a field in every record of GL_Account.M4T, which, when combined with the constant "01" is also the key to the GL_MainAccount.M4T table. Although the key to GL_MainAccount is SegmentCode+MainAccountCode, where SegmentCode does not exist as a column name in GL_Account, you can form a link by taking advantage of the fact that the Main account is always the first segment of the fully-formatted account number.

 

Link Table Name

Enter the Link table name, or click the Lookup button to list the available table names. Although any table can be defined in this field, only certain tables will form a valid link from the Primary table.