I felt the need to revisit one of the tricks mentioned in my very first blog post (which can be found here), when on one occasion it helped me solve a problem on the Power Apps community but on another occasion it did not. When it comes to embedded canvas apps, there are certain known limitations and challenges. One of the major ones is that the ModelDrivenFormIntegration control does not provide a value for fields of related entities. For example, displaying the price list of an opportunity record. This is the example that will be used in this post.
Here's the approach that solves this problem, every single time!
- Add a List screen and set the gallery's its Items property to:
[@ModelDrivenFormIntegration].Item.'Price List'
This does not result in any price lists being displayed in the gallery
- Add another list screen and set the gallery's Items property to:
Opportunities
This should display the entire list of opportunities
- Change the Items property of the 2nd gallery to:
Filter(Opportunities, Opportunity = [@ModelDrivenFormIntegration].Item.Opportunity)
This narrows down the list of opportunities to just the current opportunity that the user will be on while viewing the embedded canvas app
- Going back to the 1st gallery, change its Items property to:
First(Gallery2.AllItems).'Price List'
This selects the first record from the 2nd gallery which is the same record that is returned by the ModelDrivenFormIntegration control but now with all the related entities data as well.
Following these simple steps ensures that fields of related entities will have data visible within an embedded canvas app! To see this in action, watch:
Have fun! Get addicted!