A pivot grid view can display information from multiple entities. For example, you can create a pivot grid of the Companies service that displays person data.
Note |
---|
Currently, pivot grids can only link to a single entity. |
Follow these steps to add a linked entity to a pivot grid:
...
- If not already opened, click the Linked Entities tab in the pivot grid view's properties dialog.
- Click the New icon to open a new Linked Entities record.
- Select the linked entity in the Linked Entity drop-down list.
- Select an entity that has a link to the entity to which you are adding the pivot grid. The drop-down also displays sub-type entities.
- Select an entity that has a link to the entity to which you are adding the pivot grid. The drop-down also displays sub-type entities.
- Select the field in the linked entity that links to the current entity in the Linked Entity Field drop-down list.
- The drop-down list displays all of the fields from the entity you selected in the Linked Entity field.
- The drop-down list displays all of the fields from the entity you selected in the Linked Entity field.
- Enter a View Alias for the related entity.
- Aptify uses the view alias to qualify fields in the SQL statement. Aptify recommends that you use the initials of the linked entity as the view alias.
- Note that each linked entity must have its own view alias. In other words, you cannot assign two linked entities the same view alias.
- This is not a required field; Aptify will automatically generate a View Alias if you do not provide one.
- Specify the Join Type between the linked entity and the current entity: Optional or Required.
- Optional: Select this option if the relationship between the current entity and the linked entity is optional. For example, a Persons record does not need a company assignment. Therefore, you should select Optional if adding Persons data to a Companies pivot grid.
- For advanced users: The Optional setting create a Left Outer Join in the SQL statement that defines the pivot definecreatespivot grid's available data.
- For advanced users: The Optional setting create a Left Outer Join in the SQL statement that defines the pivot definecreatespivot grid's available data.
- Required: Select this option if the relationship between the current entity and the linked entity is required. For example, an Order must have a Ship To Person (which corresponds to the ShipToID field). Therefore, you should select Required if adding Orders data to a Persons pivot grid.
- For advanced users: The Required setting creates an Inner Join in the SQL statement that defines the pivot grid's available data. It prevent all records that do not have corresponding records in the current entity from being included in the dataset.
- For advanced users: The Required setting creates an Inner Join in the SQL statement that defines the pivot grid's available data. It prevent all records that do not have corresponding records in the current entity from being included in the dataset.
- Optional: Select this option if the relationship between the current entity and the linked entity is optional. For example, a Persons record does not need a company assignment. Therefore, you should select Optional if adding Persons data to a Companies pivot grid.
- If the linked entity is associated directly with the current entity, leave the Join View field blank.
- This is the setting for most Linked Entities records.
- Advanced users who are linking in data across multiple relationships may have to select a Join View from another linked entity. In this case, the Join View drop down list populates automatically with the list of available view aliases already defined as Linked Entities records.
- See Linked Entity With a Non Blank Join Table for an example of a Linked Entities record that does not have a blank Join View.
- Select the Join Field from the drop down list.
- This drop down list displays the list of fields from the selected Join View. If the Join View is blank, the drop down list displays the list of fields from the current entity.
- In the example below, The Linked Entity will add Persons data to the Companies service's pivot grid based a relationship where the Person's Company ID equals a Company's ID (in SQL format, vwPersons.CompanyID = vwCompanies.ID).
- If the linked entity relationship requires an additional constraint or filter, enter the constraint in the Result Constraint field.
- Most Linked Entities records do not require a Result Constraint.
- See Linked Entity That Requires a Constraint for an example where a Result Constraint is necessary.
- Click the Fields tab.
- Click the New button and perform the following steps to select fields:
- In the Field Name drop-down list, select a field to be added to the fields grid.
- The fields that appear in the fields grid will appear in the pivot grid's Field List and can be added to the pivot grid as needed.
- In the Description field, enter the appropriate description.
- The viewing system will use the specified display name as the alias for the field within the pivot grid. This is particularly important if you plan to use a non-default Detail Navigation (see Specifying Detail Navigation Settings for a Pivot Grid)
- The viewing system will use the specified display name as the alias for the field within the pivot grid. This is particularly important if you plan to use a non-default Detail Navigation (see Specifying Detail Navigation Settings for a Pivot Grid)
- If you have additional fields to select for this linked entity, select OK and New. Otherwise, select OK.
- In the Field Name drop-down list, select a field to be added to the fields grid.
- Click OK to save and close the Linked Entities record.
...