Introduction
This blog explains how to filter the lookup field based on the value selected in another lookup field in PowerApps.
Use Case: In my example, I have a custom entity named Tender which has “Project” and “Project Task” lookup fields. Further one Project can have many Project tasks. We want to show only the Project tasks of the selected Project.
Steps to be followed:
- Select the Project Tasks field

- Select the Items property of Projects Task field and update as shown

Filter('Project Tasks','Tender Project'.Project = DataCardValue7.Selected.Project)
Explanation:
- ‘Project Tasks’ = Entity name of the Project Task.
- ‘Tender Project‘.Project = Here ‘Tender Project‘ is the display name of ‘Project’ field on Project Task Entity

and .Project is the Display name of the Primary key of Project Entity

Hence it is ‘Tender Project’.Project
- DataCardValue7.Selected.Project = DataCardValue7 is the the Project field on app

Final Formula: Filter(‘Project Tasks’,’Tender Project’.Project = DataCardValue7.Selected.Project)