Show/Hide Toolbars

When creating custom fields of the type Custom Object, you can define qualifiers to filter records of the custom object definition selected for the field. For example, you might want to limit the user's options to records in a certain phase, with parent records of a specific type, and so on. This is done by writing a qualifier expression in the Qualifier field on the Custom Fields tab of an object definition, as shown in the following image.

Data Entry Fields for Custom Fields of the Type Custom Object

Data Entry Fields for Custom Fields of the Type Custom Object

Essentially, in a qualifier expression, you specify a condition to be met in order for records of the selected custom object to be displayed in the custom field. This condition is determined by the business needs of your organization.

Creating a qualifier for a Custom Object custom field is optional; however, it can narrow down the list of records available for selection, which can save users time and prevent invalid selections.

Important: Creating qualifiers for custom fields of the type Custom Object requires a good understanding of the TeamConnect object model and its attributes. Familiarity with the logic of creating qualifiers in search views and rules is also helpful.

Points To Remember

The following are the basic points about qualifiers for custom fields of the type Custom Object:

The code that you provide in the Qualifier field must be a complete expression, consisting of two sides that each identify a data value, separated by an operator (such as =). The expression compares two values. For details about the available operators, see Data Types.

You can create the qualifier either by typing it manually in the Qualifier field or with the help of Object Navigator. If you use Object Navigator, you still need to put the various parts together correctly, as described in Creating Qualifiers Using Object Navigator.

You can use multiple qualifier expressions in the Qualifier field by separating them by semicolons (;). They are treated as logical AND statements. In other words, only records that meet the conditions specified by all of the expressions in the Qualifier field are returned and available for the user to select.

When you create qualifiers for custom fields of the type Custom Object in embedded object definitions, in the end-user interface, the condition or conditions specified in the qualifier only take effect when the user adds the embedded project and saves its parent first.

The more complex your qualifier is, the longer it may take for the available records to be displayed when a user wants to make a selection in this custom field.

Whether you decide to create your qualifier by typing it manually or with the help of Object Navigator, you must familiarize yourself with the information in the following sections:

Qualifier Syntax and Data Types

Creating Qualifiers Using Object Navigator

Examples of Qualifiers for Custom Fields of the Type Custom Object

Example

Let's have a look at a specific example of a qualifier in a field of type Custom Object:

Suppose your design consists of several custom object definitions: Policy, Claim, Coverage, and Vehicle. They have the following relationships: Policy is a parent of Claim and Vehicle, Claim is a parent of Coverage (see the following figure).

Object Definition Relationships

Object Definition Relationships

 

In the Coverage object definition, you create a field of type Custom Object and select the Vehicle object in the custom object list (the Data Entry Fields for Custom Field of the Type Custom Object image). In the end-user interface, this means that Coverage records will have a Vehicle field where the user selects a Vehicle record.

If you do not write qualifiers for the Vehicle field, all Vehicle records in the database are available for selection in this field. You want to limit the choice of Vehicle records only to those records that have the same Policy parent record, as the Claim record, which is the parent of the Coverage record that has the Vehicle field.

The following qualifier limits the choice of Vehicle records as desired, by comparing the primary keys of the parent records:

this.parent.primaryKey=container.parent.parent.primaryKey

In this qualifier expression:

Keyword this refers to the Vehicle record in the Vehicle field.

Because Policy is a parent of Vehicle, the parent attribute on the left is the parent Policy record of the Vehicle record.

Keyword container refers to the Coverage record where the Vehicle field is located.

Because Claim is the parent of Coverage, and Policy is the parent of Claim, the first parent attribute on the right is the parent Claim record of the Coverage record that contains the field, and the second parent attribute is the parent Policy record of the Claim record.

If the parent record of a Vehicle record is the same as the "grandparent" record of the Coverage record, the Vehicle record is available for selection in the Vehicle field.