PowerApps - Filter Combo box control based on another table
Overview:
- I have two tables
- TableA (Columns: ProjectId, ProjectName, Project (GUID))
- TableB (Columns: ResourceName, TableA.Project)
- TableA has one-many relationship with TableB or TableB has many-one relationship with TableA.
- Below are some sample data:
- In "Start screen", I have combo box control and I need to display all the Projects where the current logged in user is part of it.
- The combo box control should display Project Id and ProjectName columns. To do that,
- Set Layout as Double
- Set the Primary text to ProjectId column
- Set the Secondary text to ProjectName column
- If you have set IsSearchable to true then select the SearchField based on your need. Here I'm going to search based on ProjectId column
- Write the below code in OnVisible property of "Start screen":
- Write the below code in Items property of Combo box control:
- Consider the same data,
- If the current logged user is "John" then Combo box control will list the "AAA", "CSX" projects.
- If the current logged user is "Andrew" then Combo box control will list only "AAA" project.
Comments
Post a Comment