Block Properties Include Tab — Relational Data
Use Parent/Child record relationships to associate a single master record with a number of related records. For example, you can associate a Sales Order or parent record with multiple Sales Order Items or child records. Only one level below the selected entity is supported. For example, if you have a Sales Order parent record with multiple Sales Order Items that are child records, and each Sales Order Item has multiple Sales Order Details records or grandchildren, you cannot retrieve the grandchild Sales Order Details records using the Include tab.
If your source data is hierarchical, you can also use the Include tab to gather source or write target hierarchical data where parent and child information is stored in a single record instead of related records, such as in an XML file. For Connectors that support hierarchical data, multiple levels of relationships are supported, such as Parent, Child, Grandchild. See Block Properties Include Tab — Hierarchical Entities.
Related entities are configured in the Block Properties Include tab for Map Blocks that support relationships, such as:
- Select Solutions from the menu.
- Select a Solution to open it.
- Scroll to the Maps section and select a Map to open it.
- Select a Query or Fetch Block.
- Select the General link in the Properties panel to open the Block Properties dialog.
- Select the Include tab.
- Scroll through the list of Related Entities and select the check box in the Select column to include the related entity in the data returned. Only entities related to the primary entity display.
- For each related entity, the following information displays:
- Relationship — Name of the object where the Relationship between the primary entity and the related entity is stored.
- Type — Type of relationship, either Parent or Child. The entity type is established by the entity relationships in the Connector.
Note: Entities from a parent-child relationship, where the Type is Child in the Query or Fetch Block, can only be used in a For Each Child Block. Entities from a child-parent relationship, where the Type is Parent, have a many-to-one relationship with parent entities, and can be processed anywhere within the Query or Fetch loop.
- Required— Select which records to return from the drop-down:
- Return records with or without relationship — Returns all records for the Primary entity whether or not there are any records for the related entity. For example, if contact is the Primary entity and account is the related entity, all contact records are returned whether there is a related account record or not.
- Return only records with relationship — Returns records for the Primary entity only if there are records for the related entity. For example, if contact is the Primary entity and account is the related entity, only contact records with at least one related account record are returned.
To exclude a Related Entity, make sure the Select check box for that entity is empty.