Fetching Related Records with Power Apps Grid Customizer
Model-Driven App
Dec 16, 2022 8:31 PM

Fetching Related Records with Power Apps Grid Customizer

by HubSite 365 about Diana Birkelbach [MVP]

Dianamics PCF Lady | Microsoft MVP | Blogger | Power Platform Community Super User | 👩‍💻 Dynamics 365 & PowerPlatform Developer | ORBIS AG

Citizen DeveloperDynamics 365Model-Driven AppM365 Hot News

Discover the advanced capabilities of Power Apps Grid Customizer, showcasing how to fetch and display related records directly within Grid cells in real-time!

Fetch Related Records with Power Apps Grid Customizer Control

The Power Apps Grid customizer control is a preview feature I really look forward to. In the last two blogs I’ve already shown how to use it for:

In this blog I’ll push the limits and show how to show related records directly inside the Power Apps Grid cells

  • Calculated column using Dataverse formula columns
  • Pros/Cons of formula columns
  • Problem 1: Am I forced to use TimeZoneIndependent columns for this use-case?
  • Problem 2. Doesn’t work in offline mode
  • The result of Dataverse formula column
  • Calculated columns with Power Apps Grid control

Open full article

Unearth the Power of Power Apps: Grid Customizer Feature

In a recently published YouTube video, Diana Birkelbach [MVP] explores the Power Apps Grid customizer control, a preview feature she eagerly looks forward to. The customizer control is found to show related records directly in the Grid cells, which can't usually include data from child relationships in views. This capability offers a solution for when users need to observe data from a related domain without needing to navigate away from the current view.

The announcement of Wave 2/2022 boosted user engagement as it showcased the forthcoming Grid control that supports "nested grids", addressing numerous customer requirements. However, Birkelbach's video illustrates use-cases that don't necessitate digging that deep. For instance, if a user wants to showcase all related users inside the project list of a table ("project") or needs to display the number of activities planned for every account in the list.

Her video demonstrated a fetch request per row, which can be optimized (fetch in batches), as indicated in the next blog post. For the purpose of her blog, however, she chose to demonstrate the list of team members related to a project.

Implementing the Functionality

The utilization of the Grid customizer feature combined with PCF (PowerApps Component Framework) enables the user to bring about this requirement with lesser code compared to traditional methods. However, since the "team members" is not a physical column of the main table, a dummy column is required. Birkelbach recommends creating a "Related Users" column of type text for this purpose. This column will always be empty and can be customized as and when required.

The PCF for the Grid customizer control then needs to be registered. Following this, the next step involves utilizing WebAPI feature through the PCF "init" method due to the need to make requests. The video demonstrated this through a code snippet, which can also be found on her GitHub repository. The video also provided a look at the "People" react component created.

The cell renderer was shown to be defined only for "Text" columns, and for all other columns except "diana_relatedusers", null is returned, thus applying the default renderer. The video also showcased the React function component, which has an internal "people" state with an initial value corresponding to the record from the cache, or null otherwise.

Birkelbach also discussed how the Power Apps Grid sometimes unloads cells, especially when scrolling up or down, leading to inactive rows being unloaded. The video wrapped up by underlining the importance of checking if the component is still mounted before changing the component state, with a reference to Jason Watmore's blog for more details.

Users eager to learn more about this topic can visit this link for detailed information.

Overview: Aiding Data Visualization and Efficiency in Power Apps

The Power Apps Grid customizer control unlocks a novel way to view and manage data. This feature simplifies the process of associating data from different domains and displaying them in a cohesive, user-friendly format. By eliminating the need for users to navigate away from their current view, data interaction becomes more efficient and streamlined. Whether it's displaying related users within a project list or tallying scheduled activities per account, the customizer control transforms how users interact with data and adds a new layer of efficiency to Power Apps usage.

Read the full article Power Apps Grid Customizer: Fetching Related Records

Power Apps - Fetching Related Records with Power Apps Grid Customizer

Learn about Power Apps Grid Customizer: Fetching Related Records


The article discusses the usage of Power Apps Grid Customizer, especially in fetching related records. If you are interested in learning more, multiple training courses could come in handy. The exact selection of courses depends on your pre-existing knowledge and what particular aspect of Power Apps you intend to focus on. Here are a few suggestions:

1. Microsoft Learning: 'Power Apps + Dynamics 365 Developer' can provide a holistic understanding of developing, securing, and integrating Power Apps applications in Microsoft environment.
2. 'Microsoft Power Apps: Canvas App Coding for Beginners' course on Udemy is a good place to start if you're new to Power Apps development.
3. 'Power Apps: Building Data-Driven Apps' allows you to understand and work with data within Power Apps.
4. If you're interested in specific features like the Power Apps Grid, 'Microsoft Power Apps: Advanced Techniques' course could prove useful.

  • Remember, the choice of courses depends on your specific needs. You might need an introductory course if you're a beginner, or a course focusing on advanced features if you're experienced.
  • Consistent practice is the key to mastering Power Apps and its features. Upon completing these courses, try creating your own Power Apps applications.
  • Lastly, join forums or communities where other Power Apps users and experts discuss various features. It could benefit from real-time problem-solving and discussions. Microsoft Power Apps Community could prove to be a good starting point.

Back to the content of the article, it begins by introducing the concept of fetching related records using the control tool, a preview feature that is much looked forward from Power Apps Grid customizer.

The blog also illustrates that, contrary to views where it is not possible to include data from child relationships, using this control will allow viewing of such relationships. The author expounds on this by providing different use cases, such as wanting to display all users associated with a project within the project list or showing how many activities are planned for each account in the list.

In order to achieve this, one would need a dummy column, as the "team members" is not a physical column of the main table. This is where Power Apps Grid comes into play, one can define a PCF control per data type. The code mentioned in the blog post can be taken from the author's GitHub repository. Apart from this, the article also touches about PCF's "init" method and how it can be used to effectively manage your views and functionalities.

In conclusion, having a clear understanding of the Power Apps Grid and how to use it to show related records is an indispensable skill for those who need to access relational data quickly. It is an integral part of increased efficiency and productivity in managing complex data sets.