# Calculated Columns

Source: https://help.codestencil.com/schema-dictionary/calculated-columns

Some stencils use strings computed from other related tables ( i.e. foreign key tables). For example, in the Chinook database, the Customer table is a foreign key table to the invoice table:

![image.png](https://cdn.eniston.com/bases/5691f589-9697-4a3a-b3a1-f6588fa2e596/attachments/1790083987_6ab28393499ca.png)

So, we may want to display **Customer.FirstName** +", " + **Customer.LastName** as a calculated field in the Invoice table to enhance how some stencils are able to generate code.



![image.png](https://cdn.eniston.com/bases/5691f589-9697-4a3a-b3a1-f6588fa2e596/attachments/1790082640_6ab27e503c549.png)

1. Column Name - This is the name of the column. Note: This column is not physically available in the table schema.
2. Set as Table Label.
3. Formula - This is the formula used to generate the required calculated string.
4. Foreign Key Table - This is a grid representing the foreign key table with all the available columns listed.
