Creating a shared column

Shared columns allow the creation of a common column for insertion in multiple views in the same database, eliminating the need to create the same column multiple times and creating a single point for propagating changes to all views using the same column. A shared column has its own design element but once inserted into a view is part of the view. A view containing a shared column is backwards compatible for access from Notes® and the Web.

To create a new shared column:

  1. In the Applications Navigator, open Shared Elements and double-click Columns.
  2. In the Columns section, click the New Column button.

You can also copy and paste an existing Shared Column design element.

To create a new shared column based on the design of an existing column in a view, open the view, select the column, and choose Create - Copy As Shared Column. This action creates a new shared column and leaves the existing view column as is.

The Shared Column design element has the same appearance and column properties as an unshared column in a view.

In addition, the Shared Column design element has properties specific to shared columns. The Shared Column properties box specifies the name of the shared column (required), an alias (optional), and a comment (optional).

To use a shared column in a view, open the view and choose Create - Insert Shared Column or Create - Append Shared Column. Select the shared column from the displayed list. Check the Use Formula Only box if you want to override the shared column display properties, such as font and column alignment, in the view. Leave the box unchecked to lock the display properties. The column programmatic name can always be modified even if the Use Formula Only box is not checked, but you should change this name only if it duplicates the programmatic name of another column in the view. You cannot modify the column value (formula).

To see the names of the views using a shared column, select the shared column in Columns under Shared Elements and click Who is using this Shared Column.

To edit a shared column, double-click the Shared Column design element in Columns under Shared Elements. You can also edit a shared column by selecting it in a view and choosing Design - Edit Shared Column.

When an existing shared column is edited and saved, all views containing the column are updated. These views are resaved with the current user ID. Where Use Formula Only is checked, only the formula is updated.

To delete a shared column, select the Shared Column design element. Press Delete or choose Edit - Delete. When a shared column is deleted, the shared column is changed to an unshared column in all views containing the column.

Shared columns may be used in DB2® Query views.

Shared columns, like shared fields, are not multilingual elements.