Skip to main content

Association

Use

The Association Control is used to handle Multiple-Multiple relationships. This control allows you to easily relate values from one collection to one or more values of another collection.

To relate them, the Association control displays the values of the Main entity as groups and the values of the other entity as records within them. A checkbox on the left of each record allows associating them in their corresponding group (value of the other entity).

FormsComponents199

In the next image, an Association control relates the Products of a Credit request with the Guarantees presented by the requester. The Basic mortgage and the Basic Vehicle guarantees are related to the Credit product. The Account and the Credit card products have no guarantees related.

FormsComponents200

Considerations

To use an Association Control, the Data model must contain:

  • A Collection A (Main collection), in the image below Products Request.
  • A Collection B (Secondary collection), in the image below Collaterals Request.
  • A Multiple-Multiple relationship between Collection A and Collection B.

FormsComponents197

The Association control is related to Collections that have a multiple-multiple relationship within them.

Properties

Every control has properties that allow customizing its behavior in the Work Portal. However, some properties are exclusive to a specific control. The following are properties exclusive to the Association control:

Basic Tab

PROPERTYDESCRIPTION
Allow FlipAllows to temporarily switch the order between the Main collection and the Secondary collection defined in the Form.

Configuration

PROPERTYDESCRIPTION
Main collection- Left collection XPath: Relates the XPath of the Main collection.
- Left display attrib: Defines the XPath of the attribute that is displayed to identify the records of the Main collection.
- Left additional attrib: Defines the XPath of the additional attribute that is displayed to identify the records of the Main collection.
- Left filter: Allows defining filters over the records displayed in the association control for the Main collection. Advanced filters (defined by rules) are not supported.
- Left header: Defines the header that identifies the Main collection.
Secondary collection- Right collection XPath: Relates the XPath of the Secondary collection.
- Right display attrib: Defines the XPath of the attribute that is displayed to identify the records of the Secondary collection.
- Right additional attrib: Defines the XPath of the additional attribute that is displayed to identify the records of the Secondary collection.
- Right filter: Allows defining filters over the records displayed in the association control for the Secondary collection. Advanced filters (defined by rules) are not supported.
- Right header: Defines the header that identifies the Secondary collection.

Example

In a Credit Request process, each Request has many Products and also has many Guarantees. A Guarantee can cover one or more Products and one Product can be covered by one or more Guarantees. The related Data Model is shown below:

FormsComponents197

To define which Guarantee covers which Products, and which Product are covered by which Guarantees, the Association Control is used.

Steps to Configure:

  1. Go to the Forms Designer and drag and drop an Association Control from the Controls tab.

FormsComponents194

  1. When the Control is dragged, a window will pop-up.

FormsComponents195

Enter the configuration information:

  • Left collection XPath: Select the XPath to the collection that contains the records to be displayed for the main entity. In this case, the Products collection.

  • Left display attribute: Select the XPath to the attribute of the collection to be displayed. In this case, the idProductSubtype.Name attribute.

  • Left filter: In this case, no filter is required.

  • Left header: Type "Products".

  • Right collection XPath: Select the XPath to the collection that contains the records to be displayed on the right of the Control. In this case, the Guarantees collection.

  • Right display attrib: Select the XPath to the attribute of the collection to be displayed. In this case, the idCollateralSubtype.Name attribute.

  • Right filter: In this case, no filter is required.

  • Right header: Type "Guarantees".

FormsComponents201

  1. Go to the Work Portal to test the Control.

In order to view records in the Control, there MUST be records added in each entity. In this case, we have:

  • Product entity: Account, credit, and credit card.
  • Guarantee entity: Basic mortgage, basic pledge, and basic vehicle.

FormsComponents198

Check the desired values according to which you wish to relate to establish the relation.

FormsComponents202