Filter Lookup field in PowerApps

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:

  1. Select the Project Tasks field
  1. 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)

Leave a Reply

Your email address will not be published. Required fields are marked *