Calculated Columns

A Calculated column can help you combine multiple colums into a single colum for a more meaningful display. For example, you can have a table that has First Name, Middle Name, Last Name in different columns. And then, you want to display Last Name +", "+ First Name in your grid. This is where a calculated column becomes useful.

Using the Chinook Database Schema we will add a calculated column called "ArtistName" to the Album table. There are 2 different ways this can be done:

Method 1

Step 1: Select the "Assign Foreign Key Lookups" from the "Actions" button on the Global Schema panel


Step 2: Assign Lookup Display Column

1 - This is the foreign key column in the Album table

2 - This is the lookup/foreign key table

A - This allows you to "Add" a calculated field named "ArtistName" to the Album table

Once the calculated column is created, you will see it appear as one of the columns in the Album table:


B - This allows you to assign a foreign key or calculated field to the foreign key colum in the Album table, hence creating a lookup.


Method 2

Step 1 : Click on the "Add" button and select "Calculated Column" from the context menu:

This opens the "Adding a Calculated Column to Track" window.




About CodeStencil

CodeStencil is Published and Marketed by Zera Systems Inc.

© 2018-2019 CodeStencil - Zera Systems Inc. All Rights Reserved.

No