i
Modeling of Related Entities
Phase 2: Forms Modeling > Advanced Tips > Modeling related entities
Related entity modeling allows to define visibility and navigability among entities.
When defining relations among entities, the following concepts are used:
•Referring entity is the one that defines the relation with another modeled entity.
•Referenced entity is the one that has a relation defined from another modeled entity.
•Relation is the one that was defined in the referring entity.
•Referring relation is the one that was defined in the referenced entity to a referring entity.
For the purpose of detailing the modeling of related entities, an example is used where the Contact and Opportunity entities are related to the Account entity. Such entities can be modeled from agile forms created from the templates provided as examples, after separating the forms from their respective processes.
Relations in the Referenced Entity
Container
In the form modeler, referring relations are modeled in the first container of the referenced entity and are only displayed if there are relations defined in other forms. Within this container controls identified with the names of the relations defined in the referring entities can be included.
The icon allows to add a list of controls to the form that represent the referring relations. By pressing this icon, a list of referring relations is displayed where you can select those you want to display at the top of the form.
The example shows the relation defined between Contact and Account and the relation between Opportunity and Account, as well as the operations and properties of both relations.
Operations
Hides the display of the relation, does not delete it.
Modifies the presentation order of relations.
Opens the properties panel of the relation.
Properties
Entity
Name of the entity where the relation was defined. Not editable.
Application
Name of the application where the entity that contains the relation was defined. Non-editable.
Relation Name
Descriptive name of the relation as defined in the referring entity when modeling the field that contains the relation. Non-editable.
Key Field
Identifier of the referring entity attribute used to define the relation. Non-editable.
Represents the name in singular that is assigned to the relation. It is displayed if, when using the form, it has a single instance for the modeled relation.
Represents the plural name that is assigned to the relation. It is displayed if, when using the form, it has more than one instance for the modeled relation.
Allows to define behavior when using the form, to assign values from a form instance to related form instances, by means of relations defined among entities.
The icon allows to open the value match wizard in an additional section to the right of the relation properties panel.
Correspondence
Destination
The form field where the value is received is selected. Once selected, the Value Type is displayed.
Value Type
•Constant: Indicates that the content of the field defined in the Destination property is a value entered by the IT modeler user.
•Field: Indicates that the content of the field defined in the Destination property is obtained from a form field that is being modeled.
Once the Value Type is selected, the Value is displayed.
Value
•If the value type is constant, it must be entered for matching.
•If the value type is a field, a list is displayed with all the form fields corresponding to the referring entity, for selection.
The example shows the properties of the Contact relation and the definition of the value match between the Industry field of the Contact entity and the Industry field of the Account entity.
When the Contact entity is instantiated, the Industry field is automatically populated with the Industry field value of the Account entity.