- bouhmidiasmaa
PowerApps Filter Contacts by Accounts in Canvas app
Updated: Apr 12, 2022
One-to-many relationships are the most common Dataverse relationships that you will work with, in model driven you can easily filter a table using a lookup field using the standard advance filtering panel in presented in the views.

The Account-Contact relationship is a one-to-many relationship, which mean that an Account lookup field is added to the Contacts table, in this post we will see how to filter on the Contacts table by the selected Account in a Canvas app.
1. First add a Dropdown input to display our Accounts:

and set the items to Accounts and Value to show the Account Name

2. Add a gallery to display Contacts

Set the Data Source to Contacts to display the list of our Contacts to filter

3.Select the Gallery and set the items to follow:
Filter(Contacts, 'Company Name'= AccountDropdown.Selected)
!!!Please note that I have renamed my Dropdown to AccountDropdown

And this should work perfectly.

#PowerApps #CanvasApps #PowerPlatform #PowerFx