<< Click to Display Table of Contents >> Association |
Use
The Association Control is used to handle Multiple-Multiple relationships. This control allows 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 ones of the other entity as records within them. A check box on the left of each record allows associating them in their corresponding group (value of the other entity).
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.
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.
•Multiple-Multiple relationship between Collection A and the Collection B.
Related to attribute types
Association control is related to Collections that have a multiple-multiple relationship within them.
Properties
Every control has a properties that allow to customize its behavior in the Work Portal. However, some properties are exclusive to a specific control. The following properties are exclusive to the Association control:
Basic tab
PROPERTY |
DESCRIPTION |
---|---|
Allow Flip |
Allows to temporarily switch the order between the Main collection and the Secondary collection defined in the Form.
|
Configuration
PROPERTY |
DESCRIPTION |
---|---|
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. For further information please refer to Filters. •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. For further information please refer to Filters. •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:
To define which Guarantee covers which Products, and which Product are covered by which Guarantees, the Association Control is used.
Follow the next steps to configure it:
1. Go to the Forms Designer and drag and drop an Association Control from the Controls tab.
2. When the Control is dragged, a window will pop-up.
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".
3. 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.
Check the desired values according to which you wish to relate to establish the relation.
Last Updated 1/6/2022 11:24:11 AM