Configure components to display case associations
The Associated Grid Control component helps you display details related to a record as subgrids. You can configure up to four subgrids using this component.
The following screenshot is an example of how you can display knowledge articles, similar, merged, and child cases related to a case using Associated Grid Control :
Add the component and configure the subgrid
In Power Apps, select the environment that contains your solution.
Select Tables, select a table, and then select the Forms area.
Open the form to which you want to add Associated Grid Control.
In the form designer, select Components from the left navigation, and then select Associated Grid Control.
Drag it to the form.
On the Properties panel, specify the following details to populate the records to be displayed on the first subgrid.
- Add Table and Default view from which the records must be displayed.
- Select Show related records if you'd like to display only records that are related to the current record on the form and not all the available records. If you select this checkbox, the form displays only the related records in Subgrid 1.
To customize the subgrid further, select Associated Grid Control in Components. Specify the following values in the Edit Associated Grid Control pane that appears:
- Customizer control: Specify the customizer control name for the entity. For example, you've configured a subgrid to display child cases. For the subgrid to display color-coded priority icons, you'll need to set the value of this field to MscrmControls.CustomCellControl.CustomCellControl.
- Customized title: Specify the display name that appears as the subgrid's name when the card loads. The original view name is displayed by default if you don't specify a value for this field.
To configure subgrids 2 to 4, specify the values for Table, Default View, Customizer control, and Customizer control for the corresponding subgrids in the Edit Associated Grid Control pane.
You'll also have to specify the table relationship in Relationship Name to display the related records in Subgrid 2 to Subrgid 4.
Configure related records for multiple subgrids
You can select Show related records check box to display the related records for only Subgrid 1 in Associated Grid Control. To display related records in Subgrid 2 to Subgrid 4 you need to specify the corresponding table relationships in Relationship name. Table relationships allow for queries to retrieve related data efficiently. Learn more in Table relationships overview.
To find the relationship between tables, do the following steps:
- In Power Apps, select the Table that contains the form you've added the Associated Grid Control to.
- Select Relationships from Schema.
- On the page that appears, find the table you've added to the subgrid in Associated Grid Control.
- Copy the Name that's against the table.
- Open the form where you've added the Associated Grid Control.
- Specify the name as the Relationship Name in Edit Associated Grid Control.
Add an alternate grid control
Out-of-the-box, Associated Grid Control uses the Power Apps grid control that supports the latest Microsoft accessibility standards and is built to be performant, extensible for the future, and aligns with the latest guidance for fonts, sizing, and styling. However, you can choose to add an alternate grid control.
Perform the following steps:
In Power Apps, select the environment that contains your solution.
Select Solutions, and then select the required solution.
Select Add Existing > More > Setting.
On the Add existing Setting Definition pane, select the Grid type for Associated grid control option and then select Next.
Select Add on the Selected Setting Definition to add the Grid type for Associated grid control option to your solution.
Go to Add Existing > App > Model-driven app> Add existing model-driven apps pane.
Select the Grid type for Associated grid control option. The Edit Grid type for Associated grid control pane appears. The Default value is set to Microsoft.PowerApps.PowerAppsOneGrid.
Select Add existing value in Setting environment value. Specify MscrmControls.Grid.PCFGridControl to replace the default values for all the apps in your environment.
Optionally, select New app value for the app. For a specified app, the tab set at the application level overrides the environment level setting.
Select Publish All Customizations.