Logical View column attributes

Previous Next

When you check a Logical View, USoft automatically computes a list of columns for the Logical View. Each of these columns will automatically get certain attribute settings based on column attributes of the underlying table(s).

Also, the view checker makes a number of special decisions. In the example below:

The column names (in the Columns tab) are NOT always the same as in the defining SQL Statement (on the right).

The Key, Mandatory, Input Allowed and Updatable column attributes are NOT always the same as in the underlying tables.

The view checker has made these decisions to enable you to use the view properly. It has added the prefixes DEPT_ and EMP_ to disambiguate between department names and employee names. It has also determined that it is the employee ID that serves as primary key, and that department names are not editable in this view:


Once the list of columns for a Logical View has been computed, you can manually change column attribute settings. In particular, when you write a Logical View that has a primary key spanning multiple columns, USoft will not always guess correctly which columns are in the primary key; it is important to specify this manually by setting the Key attribute to '1' for the correct Logical View columns.

When you set a Logical View column attribute, always consider if it is not preferable to make the setting at the underlying table level instead. For example, information that is Mandatory in the sense that it must always be supplied must be set to Mandatory at the table level, not in Logical Views. Conversely, it makes no sense to set a Logical View column to non-Mandatory if it is directly based on an underlying table column that is itself Mandatory, since the latter setting will cause the application to always require a value in this column, regardless of whether the user attempts to interact with the data through the Logical View or directly at table level.

Columns in Logical Views have their own Default Value attribute. If you specify a default value for a Logical View column, this overrides any default value set for the corresponding column(s) in the underlying table.

How to set Logical View column attributes

1.First, make sure you have finished writing the Logical View's SQL Statement.
2.Check the Logical View.
If the Logical View is correct, this will cause the Correct flag to be set to Yes and the list of Columns in the lower part of the Logical Views window or tab to be (re)computed.
3.Edit the attribute settings in the Columns grid as required.


See Also

How to Define Logical Views

Checking Logical Views

Logical View Limitations

Data Manipulation through Logical Views

Rule-based Logical Views