Previous Topic: Create a Data Partition ConstraintNext Topic: Constraint Definition


Data Partition Constraints Fields

Complete the following fields to add or modify the data partition constraint fields:

Data Partition Name

Specifies the name of the data partition for which the constraint being defined.

Table Name

Specifies the database table that is controlled by the constraint.

Constraint Type

The type of constraint being defined. There are six constraint types for each table in a data partition.

Create

Specifies the criteria that must be met before creating a record. When a user in the data partition attempts to create a record that does not match the create test condition, CA SDM displays the error message that is associated with the constraint and does not save the record.

Defaults

Specifies one or more assignment statements, separated by semicolons, defining values to be assigned to empty fields in a new record at the time the record is stored. The syntax of each assignment statement is, where att_name is the name of a Majic attribute from the record, and value can be an integer, a string that is enclosed in quotes, or a reference in the form @root.att_name to a Majic attribute in the contact record for the current user:

att_name=value

For tables updated for tickets, default values are placed into the record at the time it is displayed and are shown on the initial display of a new record. You can assign a default value to a reference field (a Majic SREL) by coding it in the form of a persistent ID. A persistent ID is an object name followed by a colon and an integer ID. For example, you can set a default value for category by including the following in the defaults specification, where PCAT is the target of the SREL (as shown in the Majic file) and 12345 is the ID number of the desired category:

category='PCAT:12345'

You can list persistent IDs for an object using a command of the form:

bop_odump domsrvr pcat "" sym
Delete

Specifies the criteria that must be met to delete a record. When a user in the data partition attempts to delete a record that does not match the delete condition, CA SDM displays the error message that is associated with the constraint and does not delete the record.

Pre-Update

Specifies the records in the controlled table that a user can update in the data partition. When a user in the data partition requests a record that does not match the pre-update condition, CA SDM makes the record read-only and displays the error message that is defined with the constraint.

Update

Specifies the criteria that must be met when a record is saved. When a user in the data partition attempts to save a record that does not match the update condition, CA SDM displays the error message that is associated with the constraint and does not save the record.

View

Specifies the records in the controlled table that a user can view in the data partition. This constraint is automatically applied to all lists selected by a user in this data partition, in addition to any selection criteria explicitly specified by the user.

View can include joins to other tables and references in the form @root.att_name to Majic attributes in the contact record for the current or logged-in user. The valid examples are:

requestor.organization = @root.organization
requestor.organization.name = 'MIS'
assignee = @root.id
assignee.organization = @root.organization

Note: The Create, Delete, Pre-Update, and Update constraint types now support joins to other tables. They can also include references in the form @root.attribute to attributes in the contact record for the current user.

Record Status

Indicates whether the constraint is active or inactive.

Error Message

Specifies the message returned to the user, if the constraint criteria is not met. For example, "You can only update issues assigned to you" or, "You can only create issues for your organization" or, "You can update your contact record but cannot change the data partition."