You are here: Reference > Rule types > Associations > Association form - Completing the Data Access tab

Association form
Completing the Data Access tab

  1. About 
  2. New 
  3. Data Access 
  4. History 

Use an Association rule to define a relationship between two classes based on matching values in pairs of properties. A typical use of an association rule is to automatically add a join to a report (from a Report Definition) that displays properties from both classes referenced in the association.

Associations are one-directional. To represent the relationship between two classes A and B, you usually need to define two associations:

Fields

Field

Description

Class Name

Select a class to be the primary class for the association.

If this work type is derived from Work-, a concrete class is required whether you want to join to an implementation class, or to a framework class.

Type of Join

Optional. The default choice, Only include matching instances, indicates that the association will only include instances in each class that have a matching instance in the other class (referred to in SQL database terms as an inner join). By choosing one of the other options here, you can instead use an outer join for the association, in which all instances of one of the classes are included in the association even if they have no matching instances in the other class.

Filter

Complete this array to identify the match criteria. Enter at least one row.

Label

Enter a text label to uniquely identify the condition in this row. The label is used in the Logic field in the header of this section to combine conditions into a single logical condition.

Property

Select a (top-level, Single Value) property associated with the class you specified in the Class Name field. Select a property that is an exposed column in the database table that holds instances of the class.

Operator

Is Equal.

Join Property

Select the (top-level, Single Value) property in the association’s Applies To class that corresponds to the Property value entered above. This property must also be an exposed column.

Logic

In the text box at the top of this section, using the values entered in the Label field, enter a logical expression that defines how the system combines the criteria into an overall logical condition at runtime. The expression can include parentheses and the operators AND and OR.

If the Filter array contains only one row, enter the row label here.

By default, if the Filter array contains two or more rows, the logic statement uses AND, requiring that all match criteria are met. You can accept this statement, or enter another statement using all labels.

For example, if the table contains four rows labeled A, B, C, and D, you can enter: (A OR B OR C) AND D in this field. This notation is the same as for the logic statement in when condition rules.

About Association rules